Tuesday, September 25, 2012

VmWare Workstation 8 Host-Only Networking

I downloaded a pre-configured vmware virtual machine running SITS on linux with Oracle for training purposes and ran it in VmWare Workstation 8. The VM boots up OK, but I can’t ping it from the host. VmWare is configured for host-only networking using 192.168.243/24 and the IP reported by the VM matches the one I would expect DHCP to have given it: 192.168.243.128 (VmWare leaves the first half of the range for static IPs so we start at 128).

A second VM guest, an old Windows XP box for old browser testing, connected to the same virtual network, can ping the SITS VM. This one has IP 192.168.243.129, the next one in the DHCP range, so is also as expected.

Windows Firewall is disabled on the host so it can’t be that getting in the way.

Inspection of the IP address of the virtual adapter on the host (Network Connections lists it as VmWare Network Adapter VMnet1) shows something weird: the IP address is not 192.168.243.1 as expected, but is 196.254.47.16/16!

I used the Virtual Network Editor in VmWare Workstation to create a new host-only network (VmNet2). This was assigned 192.168.47/24. I shut down the SITS guest VM, changed it’s VmWare settings to use the new VmNet2 and then restarted it. It gets 192.168.47.128 assigned as expected, so it’s on the new network.

The host can ping it! Inspection of the new virtual adapter on the host shows it has been given 192.168.47.1 as expected.

This confirms that a Windows 7 VmWare host can contact guests in a host-only network (I have previously been told they cannot and it only permits guest-to-guest networking, which I have just proven to be false).

So something has screwed up the VmNet1 host-only network adapter configuration on the host. No idea what, but as this is a dev machine it could have been anything including myself.

No comments: