ESXi Hypervisor – Cannot get multiple VMs to connect to Internet

hypervisornetworkingvirtualizationvmware-esxi

Pulling my hair for past few days over this. Can some VMWare ESXi expert help out?

I recently decided to give ESXi 5.5 a try. Installed it, got connected through vSphere client, and created few CentOS 6 VMs.

My ESXi configuration has all 3 CentOS6 guest VMs using the same vSwitch0:

My problem is only one of the VMs can get an automatic DHCP address, and hence can correctly connect to Internet. Rest of the VMs cannot get an IP address at all.

Is there any special setup required to allow guest VMs to get using the Internet?

I noticed that when I created the first VM, it was up and running, connected to Internet normally. When I installed second VM, trying to enable the network during CentOS install complained saying it cannot activate eth0. I did nothing extra, and this has stumped me for past few days.

Things I tried so far-

  1. Tried switching from ESXi 5 to ESXi 4 – same problem
  2. Tried enabling 'Promiscous mode' on vSwitch0's properties – same problem
  3. Tried a guest Windows VM – same problem, could not get IP

The ESXi hosts gets a dynamic DHCP assigned IP. I tried changing that to static, but nothing changes.

Best Answer

I agree with Shane. You could try deploying a software router as a VM (like pfSense) and have it act as the NAT router for all of your VM's. The pfSense would have two interfaces, one on the external network/portgroup (the one that goes to your ISP) which would be configured as a DHCP client,and one on an internal VM network that would act as a DHCP server (you'd need to give this interface an IP like 192.168.100.1.) The pfSense would then be configured to act as a NAT router for all of your VM's. This should be a free simple fix for your issue.

In short, you'd have two port groups (VM, and external) with all the VM's on the VM network, and the pfSense with an interface on both the VM network and the external network.