Sometimes it can be tricky to fully access the VMware ESXi server as well as all virtual machine consoles (MKS) as the ESXi has multiple VMkernel ports but can only accept one single default gateway.

This is especially the case if your ESXi servers are hosted in a provider environment and you have only a public IP address as an initial configuration. To get a better idea of the network setup, check out the following simple network diagram.

  • Internet Gateway has the ip address (don’t use that example, as it’s the Google dns)
  • ESXi Host has two vmkernel adapter: vmk0 and vmk1
  • ESXi Default Gateway is configured to use
  • LAN Subnet / 24
  • LAN Gateway to access other networks
  • Client Admin subnet is / 24

network diagram - static routes for VMware ESXi

If you access the ESXi Host using, so the public ip address all works fine:

  • vSphere Client access
  • vCenter access
  • vSphere Webclient access
  • import of virtual appliances
  • Console session to virtual machines

If you try to access the ESXi Host using from a system located in (client Admin network) likely no communication will work. 

The system within the network knows its way to but there is no route that helps the VMkernel port to find it’s way back. The ESXi system always tries to use the vmk0 adapter and the default gateway to reach the network and that obviously fails.

VMkernel network configuration

Depending on the routing situation, the ip connectivity or the way vCenter is accessing the ESXi hosts using the client admin system you might be able to use the vSphere client, vCenter or the Webclient to access and configure the ESXi hosts or start virtual machines but the console session or the import of virtual appliances fails due to network errors. Sometimes the console session is just black.

In that example, this can be real tricky if the VMware vCenter server is located within the network and accessing all ESXi hosts in the right way and your client is connected to vCenter from All seems fine until you try to open a VM console session or an import of an ova image fails while accessing the vmdk files.

What needs to be done is to add a route for the network using the router.

Let’s start step by step:

  1. Open a console to the ESXi or ESX host. For more information, see Using Tech Support Mode in ESXi 4.1 and ESXi 5.x (1017910) orTech Support Mode for Emergency Support (1003677).
  2. ESX 4.x and 5.0, run esxcfg-route -a
  3. ESX 5.1 or 6.x, run esxcli network ip route ipv4 add –gateway –network

Check out the VMware KB article for more information

If all went well, you should be able to fully access your ESXi hosts using vSphere client or vCenter without any limitation. Should you run a hosted ESXi with a public IP being accessible out of the wild wild internet, now it’s also possible to completely lockdown the ESXi on the vmk0 interface. Of course before you made sure that you can access all you need from within the LAN or a VPN.

To health check on your vSphere environment make sure you register for vSphere Health Analyzer here


Save energy without reducing VM performance in your VMware vSphere cluster
16 August 2022
Over the last couple of decades energy consumption went up massively in every data center and while the…
Metrics & Logs support for IoT - Bringing Secure Monitoring and Logging to the Edge
7 July 2022
Simple uptime monitoring for Internet-of-Things (IoT) is well-known and requires knowing if the devices are up and running.…
Monitoring Azure SQL Managed Instance with Opvizor Metrics & Logs
17 January 2022
When you have critical applications and business processes that rely on Azure resources, it's critical to keep an…

White Paper — Registration

You will receive the research paper by mail.

Codenotary — Webinar

White Paper — Registration

Please let us know where we can send the whitepaper on Codenotary Trusted Software Supply Chain. 

Become a partner

Start Your Trial

Please enter contact information to receive an email with the virtual appliance download instructions.

Start Free Trial

Please enter contact information to receive an email with the free trial details.

Subscribe to our newsletter