Cannot Connect CentOS VM to Internet (NAT Connection)

The best option is to let it grab an ip automatically from DHCP:

dhclient -v

This will let centos get an ip automatically.


I just fixed this problem, not sure if anyone found the soultion. How I fixed it for myself was in the VMware (I have 12th version) I went to

  1. Edit
  2. Virtual Network Editor
  3. Restore Defaults
  4. then click okay
  5. I reinstalled Centos 7
  6. Click on Network & Host Name
  7. Click On for Ethernet
  8. Wait for details to populate i.e. ip address, subnet mask, dns...
  9. Works.

You may not have to uninstalled the OS just try going to edit and virtual network editor first and restoring to defaults first. This should work for all OS you install on VMware.


For further readers

I ran through the same problem. Sometimes problem could be in the host machine (Windows 10, and VMware workstation 12), for example in my case.

Check if VMnetDHCP service is running.

right click on windows icon -> task manager -> service tab

if not, then start the service and restart your guest OS in VMware. VMnetDHCP service