Accessing network machine by name in VMWare Player

For each customer I have a separate VMWare virtual development machine. This allows me to separate all environments, as for each of them I have other software and frameworks installed, and mixing these may cause compatibility issues. And if something happens with my laptop, I don’t loose my virtual machines and can simply use them on another laptop.

I was having one issue though: from within a virtual machine I could not access the internal network, for example, pinging a machine in the network resulted in an error:


First solution

VMWare Player’s network adapter was configured to use NAT; and internet connection was working fine. Then I looked up the IP address of the network machine, and tried to ping that one:


And this worked. So it meant that it could not resolve the machine name.

To solve this, I added the mapping between IP address and machine name in the hosts file:


After that, I could access the machine by its name without a problem:


Second solution

I was not very happy with the first solution. But then I found that without these entries added to the hosts file, I could still access the machine if I used its name suffixed with the domain extension:


So, a better approach would be to somehow make the virtual machine automatically add the domain suffix with each call.

Indeed, if I did a ipconfig /all, it showed that DNS suffix Search List was localdomain:


To change this, go to ‘Control Panel\Network and Internet\Network and Sharing Center’, and click the connection. Then click properties, select the ‘Internet Protocol Version 4’, and click properties. Click the advanced button. In the DNS tab, add the required DNS suffix:


Now an ipconfig /all reveals that the DNS Suffix Search List now is the actual domain:


So now, if we ping the machine with just its name, it works:



Third solution

And then it seems there is yet another way of solving this. Right click ‘Start/Computer’ and click properties. Click ‘Change settings’ next to the computer name, and then click the ‘Change’ button, then the ‘More’ button, and fill in the Primary DNS Suffic of this computer:


It has the same effect, but also changes your default domain.

But, unfortunately…

…after a reboot, it stopped working again. With NAT mode I had internet connection but network did not function properly, with bridged mode network worked but I did not have internet connection. I tried every solution that I found on the net but none of them worked. So I decided to give VirtualBox a try… and there everything worked immediately, out of the box! See my post about that.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s