For some configurations, you might need to set up more than one host‐only network on the same host computer.
You might, for example, want to have two virtual machines connected to one host‐only network, and at the same time have other virtual machines connected to another host‐only network. This setup isolates network traffic on each network.
Or you might want to test routing between two virtual networks. Or test a virtual machine with multiple network interface cards — without using any physical Ethernet adapters.
On Windows hosts, the first host‐only network is set up automatically when you install VMware Server.
On Linux hosts, the first host‐only network is set up when you run the
vmware-config.pl program after you install VMware Server (provided you agree to install host‐only networking). If you did not agree to use host‐only networking, you need to run the script again to set up host‐only networking.
To set up the second host‐only network, follow the steps outlined below for your host operating system.
To set up the second host-only interface on a Windows host 1 Choose Host > Virtual Network Settings > Host Virtual Adapters.
2 Click Add new adapter.
3 Choose the virtual network on which to use the adapter and click OK.
4 Click Apply.
5 Click OK to close the Virtual Network Editor.
To set up the second host-only interface on a Linux host 1 As root (su -), run the VMware Server configuration program.
vmware-config.pl
CAUTION To configure VMware Server correctly, the vmware-config.pl configuration program requires all virtual machines to be shut down. The program shuts down any running virtual machines automatically.
After asking about a NAT network, the program asks:
Do you want to be able to use host-only networking in your virtual machines?
2 Select yes.
The Wizard reports on host‐only networks that you have already set up on the host or, if no host‐only network is present, configures the first one.
The Wizard asks:
Do you wish to configure another host-only network?
3 Select yes.
Repeat this step until you have as many host‐only networks as you want. Then answer no.
4 Complete the remaining steps in the Wizard.
When the Wizard is finished, it restarts all services used by VMware Server.
5 Run ifconfig.
You should see at least four network interfaces — eth0, lo, vmnet1, and vmnet2. If the VMnet interfaces do not display immediately, wait for a minute, and run the
command again. These four interfaces should have different IP address on separate subnets.
Configuring the Virtual Machines
Now you have two host‐only interfaces (VMnet1 and VMnet2). You are ready to set up your virtual machines for one of the following configurations:
! The virtual machine is configured with one virtual Ethernet adapter, and that virtual adapter is connected to the default host‐only interface (VMnet 1).
! The virtual machine is configured with one virtual Ethernet adapter, and that virtual adapter is connected to the newly created host‐only interface (VMnet2).
! The virtual machine is configured with two virtual Ethernet adapters. One virtual adapter is connected to the default host‐only interface (VMnet1) and the other virtual adapter is connected to the newly created host‐only interface (VMnet2).
Configuration 1 — Connect to the Default Host-Only Interface 1 Create the virtual machine or use an existing virtual machine.
2 Launch a VMware Server Console and open the virtual machine.
3 Select VM > Settings to edit the configuration using the virtual machine settings editor.
4 Select NIC, select Custom, and choose VMnet1 (Host‐only) (on a Windows host) or /dev/vmnet1 (on a Linux host) from the drop‐down list on the right.
If no network adapter is shown in the list of devices, click Add, and use the Add Hardware Wizard to add an adapter.
Configuration 2 — Connect to the Newly Created Host-Only Interface 1 Create the virtual machine or use an existing virtual machine.
2 Launch a VMware Server Console and open the virtual machine.
3 Edit the configuration using the virtual machine settings editor (VM > Settings).
Select NIC, select Custom, and choose VMnet 2 (Host‐only) (on a Windows host) or /dev/vmnet2 (on a Linux host) from the drop‐down list on the right.
If no network adapter is shown in the list of devices, click Add, and use the Add Hardware Wizard to add an adapter.
Configuration 3 — Connect to Two Host-Only Interfaces 1 Create the virtual machine or use an existing virtual machine.
2 Launch VMware Server and open the virtual machine.
3 Edit the configuration using the virtual machine settings editor (VM > Settings).
Select the first network adapter in the list of devices, select Custom, and choose VMnet1 (Host‐only) (on a Windows host) or /dev/vmnet1 (on a Linux host) from the drop‐down list on the right. Select the second network adapter in the list of devices, select Custom, then choose VMnet 2 (Host‐only) (on a Windows host) or /dev/vmnet2 (on a Linux host) from the drop‐down list on the right.
If you need to add one or more network adapters, click Add, and use the Add Hardware Wizard to add an adapter.
At this point you can power on the virtual machine and install your guest operating system. In configurations 1 and 2 you see one AMD PCNet Family Adapter. In configuration 3 you see two AMD PCNet Family Adapters within the guest. Configure the Ethernet adapters as you would physical adapters on a physical computer, giving each adapter an IP address on the appropriate VMnet subnet.
On Windows hosts, you can open a command prompt and run ipconfig /all to see what IP addresses each host‐only network is using.
On Linux hosts, you can open a terminal and run ifconfig to see what IP addresses each host‐only network is using.