VNC access to ESXi Guests OS

Following these steps we’ll be able to open the port 59xx on the ESXi firewall.

In this way we’ll can connect through VNC to a Guest OS :

  1. Connect to the ESXi Server with vSphere client
  2. Select Configuration tab, locate and open the Software list box, then select Security Profile.
  3. In the Firewall section, select the Properties link to display the Firewall Properties dialog box.
  4. In the dialog box, scroll to and select GDB Server, then click OK.
  5. Your ESXi server now allows VNC access to Guest VM consoles through its firewall.

Now we can enable our Guest machine to be reached by VNC client.

  1. Edit <guestvm>.vmx file (that file which define vm resources)
  2. Add on bottom the following rules :

RemoteDisplay.vnc.enabled=”TRUE”
RemoteDisplay.vnc.port = “5901” (here you can define the port on which you want to connect the range is 5900 – 5999)
RemoteDisplay.vnc.password = “supersecretpassword”

Also if we want to specify our keyboard map we can add :

RemoteDisplay.vnc.keyMap = “xx” where xx is our language (eg: us or it or jp etc.)

Boot the machine and try to connect to <esxip>:5901 and when requested try to put the choosen password.

Bye