Home/IT/Solaris/Solaris 10 Custom JumpStart/DHCP Server  

Solaris on VMware: Custom JumpStart  

← Previous|Next →  

You can safely skip this section if you don't understand it completely. However, if you want to get access to the Solaris machine over the network, it is highly recommended to adapt this operation.

A virtual machine using the VMware built in DHCP server over the NAT network interface vmnet8 can give the network configuration of the Solaris computer completely under control of VMware. Unfortunately, this has two disadvantages:

  • The machine will be called unknown, which is not what I would call a beautiful hostname.
  • You can't predict the IP address of the virtual machine for sure. This is a problem if you want to use any Solaris network service (such as SSH) from outside (from the VMware Host). The current IP address may be found out by simply typing /sbin/ifconfig -a, but that's not very comfortable.

These problems can be solved with two little changes in the virtual machine and in the DHCP server configuration.

MAC Address of the Solaris PC's network adapter

You must manually assign an MAC address for the virtual machine. This is the number that is usually hard wired to the network adapter and makes it possible to identify a certain machine even if the network configuration is not yet set up. The MAC may be used by VMware's DHCP server to identify the Solaris machine before the network is up and running. Normally, these numbers are generated by VMware and stored in the VM's configuration file the first time the machine is powered on. In our case the MAC must be assigned manually. The configuration file is solaris/solaris.vmx.

In the configuration file solaris.vmx add the following lines before the first start of the VM:

ethernet0.addressType = "static"
ethernet0.address = "00:50:56:00:00:01" 

There is usually no need to change the number itself. But if you want to install several Solaris PCs you must assign a unique number to each machine. Keep the first three hex numbers as they are (they belong to VMware) and play around with the rest.

VMware's DHCP Server

For the second step you will need root access to the host (in Windows: Administrator privilege). You must edit the DHCP server's configuration file. This is usually /etc/vmware/vmnet8/dhcpd/dhcpd.conf in Linux and something like C:\Documents and Settings\All Users\Application Data\VMware\vmnetdhcpd.conf in Windows XP.

This configuration file holds information about the network which the DHCP server is taking IP addresses from. First find out which network this is. Then you can specify a certain IP address for the Solaris client and invent a hostname. Open the configuration file with your favorite text editor (make a backup!) and look for lines that look similar to:

subnet 192.168.4.0 netmask 255.255.255.0 {
range 192.168.4.128 192.168.4.254;
...
}

This network has been selected during the setup of VMware Workstation either automatically or by yourself. Now the following rules apply: Select an IP address for the Solaris client which is part of the same network (here: IP numbers from 192.168.4.1 to 192.168.4.254), but which is not part of the DHCP server range (in this case: keep below 192.168.4.128). The first numbers of the network are taken by VMware for certain claims (.1 and .2 in particular), so please leave the first five or ten numbers for VMware. In this case, an IP address of 192.168.4.10 would be fine for the Solaris machine.

This number, which is now defined as the IP address for the Solaris virtual machine, has to be connected with the desired hostname. Enter the following lines at the end of the configuration file:

host trillian {
    hardware ethernet 00:50:56:00:00:01;
    fixed-address 192.168.4.10;
    option host-name "trillian";
}

The most important entry is the MAC address (00:50:56:00:00:01) which is used to identify the virtual machine. Choose the same value as written in the VM's configuration file. Finally the VMware services need to be restarted.

# /etc/init.d/vmware restart

In Windows you must restart all VMware service or just reboot your computer.

  Next →