VMware Communities
MitchMiller
Contributor
Contributor

Linux Guest NAT DNS Trouble

I have Workstation 9.0.3 running on my Windows 2008R2 server. The server is a DNS & Domain Controller. I understand the idea that this is bad practice but I have just the one physical machine to use.

I have several Windows VM's running using NAT and assigning their IP's to be static as follows.

IP : 192.168.28.x

SUBNET 255.255.255.0

GATEWAY 192.168.28.2

DNS: 192.168.28.2

This works fine for all of my Windows Virtual Machines.

If I setup a VM with Ubuntu, Fedora, CentOS, or Debian I can assign the IP as I do in the Windows machines however they cannot access the internet.

I can ping 8.8.8.8 and get a response, I cannot ping anything by name, so no web browsing, no updates to the machine can take place etc.

I use to think it was an issue with Linux, however I can run the same distributions in VirtualBox and they work flawlessly.

Any help would be appreciated, I would prefer to stick with VMWare.

Tags (3)
0 Kudos
7 Replies
newbie93
Hot Shot
Hot Shot

For CentOS 6.x (in the guest):

route add default gw 192.168.28.1

If this works, to make it permanent through a reboot you'll need to make a file called route-eth0 (or whatever adapter you're using) and put the routing info in it. (Google is your friend for the exact syntax, I forget - I use too many different linux distros...).

If you're using CentOS 7, then all bets are off..

0 Kudos
MitchMiller
Contributor
Contributor

The above did not help me, I am using CentOS7, also tried it with Ubuntu, Fedora, and Debian. There has got to be something else missing here. They all work in VirtualBox.

0 Kudos
louyo
Virtuoso
Virtuoso

In CentOS guest, what is contents of /etc/resolv.conf?

This is where your DNS servers should be listed.

Lou

0 Kudos
MitchMiller
Contributor
Contributor

/etc/resolv.conf has nameserver 192.168.28.2

That is the DNS windows guests use and they can work correctly, also it's what is used when going through Virtual Box and they work correctly as well.

0 Kudos
dariusd
VMware Employee
VMware Employee

This is really bizarre.

For test purposes, please create a new virtual machine attached to a NAT network, and boot it into the Ubuntu live CD/DVD (i.e. connect and boot from ubuntu-14.10-desktop-amd64.iso and choose the "Try Ubuntu" option), then launch Firefox.  The guest OS should automatically configure itself using DHCP.  Can you browse to https://communities.vmware.com/ from inside that virtual machine?

Cheers,

--

Darius

0 Kudos
MitchMiller
Contributor
Contributor

The Ubuntu 14.10 Live CD does the exact same. It has no internet access but can ping the other machines on the NAT network.

I am wondering if VMWare is having trouble with Linux/NAT running as guests on a Windows host that is a Windows 2008R2 Server used as the domain controller which also means it is a DNS server. The Windows guests have no trouble though.

and I was wrong in one point, even Virtual Box does not work correctly. It must be Linux limitation of not being able to assign two nameservers? On my windows host I can do 192.168.28.2 & 8.8.8.8 - Linux seems to only try one.

0 Kudos
MitchMiller
Contributor
Contributor

I believe I have solved the issue myself. I created a new Windows VM to be the Domain controller and DNS so that the host machine does not need those roles. It appears things are working better now. I am able to ping the other VM's and the internet using NAT. Thanks for all the help. I assume there was some issues with VMWare running on the domain controller.

0 Kudos