Using VNC in VMWare ESXi 5.0

VNC can be enabled on ESXi hosts to enable remote console connections to virtual machines; this is useful for Mac users who do not have a native VMWare vSphere client or to provide console access for users who are otherwise without the vSphere client.

Verify Host Firewall Settings

The VMWare host needs a custom firewall rule to allow VNC connections, to verify if this already exists browse to the host in the inventory, go to the configuration tab, and click ‘Security Profile’ under the Software section of links:

VMWare VNC Firewall Rule

Click image to view full size.

You should see the VNC firewall rule shown above, if not then the rule needs to be configured: (If the rule already exists, skip to ‘Configure a Virtual Machine for VNC’ section.)

*In the ‘Services’ section of the security profile window shown above, click Properties

*Select SSH and click the options button, then start SSH

*SSH to the IP address of the VMWare host and enter the following command:

vi /etc/vmware/firewall/VNC.xml

This will create a new firewall rule file, press ‘a’ on your keyboard to enter edit mode. (vi is a CLI based text editor)

<ConfigRoot>
<service>
<id>VNC</id>
<rule id='0000'>
<direction>inbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>
<begin>2000</begin>
<end>2099</end>
</port>
</rule>
<rule id='0001'>
<direction>outbound</direction>
<protocol>tcp</protocol>
<porttype>dst</porttype>
<port>
<begin>0</begin>
<end>65535</end>
</port>
</rule>
<enabled>true</enabled>
<required>false</required>
</service>
</ConfigRoot>

Paste the above into the file (opens ports 2000 – 2099), then press the escape key and enter ‘:wq’ (without the quotes) to save the file and exit the text editor. Now you need to refresh the firewall rules:

esxcli network firewall refresh

Now if you refresh the firewall rules in vSphere the new VNC rule should appear.

Configure a Virtual Machine for VNC

Now that the firewall rule is enabled all that is left is to enable VNC on the virtual machine. The VM needs to be shut down to edit this setting.

  1. Go to ‘Edit Settings’ for the virtual machine
  2. Go to the ‘Options’ tab
  3. Select ‘General’ under the Advanced section
  4. Click the ‘Configuration Parameters’ button
  5. Add rows to the list as shown in the image below:
VMWare Enable VNC on VM

Click image to view full size.

Be sure to choose a port number within the range 2000 – 2099 as these are the ports we opened on the firewall. ‘RemoteDisplay.vnc.password’ is optional, if you do not add it then VNC will work without any authentication.

That’s it! You should now be able to VNC to the IP address of the VMWare host, with the port number you configured for the VM!

Installing Windows 8

Just downloaded the Windows 8 Developer Preview, not really loving the home screen type thingy – I don’t think it will work very well for desktop PCs. You can download the ISO image for the install from Microsoft here.

2012 Challenge

Okay so we have now been for a couple runs, and I have also logged a bike ride from Saturday. You can keep track of how we are doing, and also sponsor us (money goes to Cancer Research UK) if you wish, at this website. We are planning to go for a run of about 4Km (Going up to around 10Km when we can manage it!) three times a week, which should enable us to complete the challenge in time :)

You can also check out my ‘Map My Ride’ page to see the details of each run/cycle including avg speed, incline etc: Map My Ride

A brief update

Thought I would post a quick update as I haven’t done one in quite a while!

The internship at Cisco is going pretty well so far, I am about four months in so have got the hang of it now :) Seems like working at Cisco in general is pretty awesome; we get to lay our hands on all the latest and greatest Cisco devices (some are not even released when we get them!), and there are endless resources for me to practice for the CCNP exam with! I pretty much have a whole rack full of equipment to myself to study with :D

On a separate note myself along with the other interns in ECATS have signed up for the 2012km challenge for the London Olympics next year! This means that we will have to travel (by running, cycling, swimming, rowing etc etc…) 2012km, I think we are aiming to do it before the end of our years internship which more or less coincides with the start of the 2012 Olympics. I think it is going to be tough, but hopefully I won’t be such a fat bastard by the end of it, plus raise some money for charity along the way!

If you would like to sponsor us I will be posting some details of how to donate here soon, once we have got our plan together and sorted out the donate page etc!

New Server

If you are seeing this post then you are being served this page by my new VPS, courtesy of @hexxeh!