VMware Cloud Community
malcolm061990
Contributor
Contributor

VM can't connect to network/Internet in default installation

Hello.

I have the host with Vmware ESXi6, that connected to Internet. Default installation.

I create VM with Ubuntu 16.10 or Fedora24 with the default network adapter coonected to. And my VM can't get the addresses to connect with the Internet.

I worked with the other hypervisors (like Proxmox or Hyper-V), so the default installation of VM on other hypervisors allow to connect with Internet at once.

What can I do to solve this issue with the connection to Internet?

0 Kudos
8 Replies
hussainbte
Expert
Expert

1st thing is ESXi host does not require access to internet.

So If you have management network of ESXi having internet access, there is no use case. not even for getting updates from VMware as it gets it through VMware update manager.

2nd thing.

If you wish to continue with the existing setup and make sure the VMs also get internet access, the VMs have to be placed in the same vLAN/Network.

Create a VM portgroup with same vLAN as management and assign the VM network from this portgroup. make sure the physical nics used for VM Network Portgroup are trucked with the appropriate vLANs.

Hope it help!!! let me know if you need more clarification

If you found my answers useful please consider marking them as Correct OR Helpful Regards, Hussain https://virtualcubes.wordpress.com/
0 Kudos
malcolm061990
Contributor
Contributor

You showed 2 things, thanks.

For 1st thing I can say that I have default installation:

two port groups (VM Network with two VMs in it, Management Network);

one virtual switch with active physical link and two port groups;

two physical links, but one is active;

one VMKernel NIC in portgroup Management Network;

Default TCP/IP stack.

default firewall rules.

For 2nd thing I can say that VMs are placed in the same vLAN/Network.

VM even don't get an IP automatically by DHCP. I think that new VM will get the IP address automatically by default.

I want VMs to get addresses by DHCP in gray network, and default gateway will be the virtual interface on hypervizor. So the VMs will access to the network.

Please, help to solve this problem.

0 Kudos
vXav
Expert
Expert

As Hussain said you need to check that the ports on your switch on which your esxi is connected or configured as trunk with the right VLANs authorized.

You can check what the NIC "sees" by going in the manage tab of the host > Networking > Physical Adapters.

In "Observed IP range" you'll get what networks that nic discovers.

0 Kudos
malcolm061990
Contributor
Contributor

Ok.

I attach screens with my installation.

0 Kudos
malcolm061990
Contributor
Contributor

So what can I do to solve the problem?

0 Kudos
a_p_
Leadership
Leadership

The IP address for the Management Network is a public IP address (which btw. you may consider to gray out in the screenshot for security reasons). Does your ISP provide a DHCP server, or did you setup one for this subnet? Without a DHCP server in place, you have to use IP settings to the VMs.

André

0 Kudos
malcolm061990
Contributor
Contributor

In this situation my ISP doesn't provide a DHCP server.

I have only 1 public ip address that is binded to hypervisor.

I want to use some gray addresses on my VMs to connect them to Internet via network adapter of hypervisor.

0 Kudos
vXav
Expert
Expert

For me it is incredibly bold to stick your hypervisor on a public IP, except if you have a good firewall.

I can't think of any benefits in doing so but you know some I'm genuinely interested to know why as I have never seen that.

You should :

  • put your hypervisor in your LAN behind a router
  • Give your VMs access to internet via NAT
  • Open the services of your VMs to the world by forwarding ports on your router
  • Set up a DHCP server or use your router
  • Keep your management local to your network, you don't really need internet on it you can "proxy" pretty much everything (WSUS, VUM, NTP, Squid, ...). Or if it needs access just open outbound 80, 443, 123, ... (usual ports).

Well, implementing the usual best practice in short.

0 Kudos