About me

Paolo Iannelli Picture

Paolo Iannelli

Sr. Software Engineer / Software Architect at LeaseWeb

Amsterdam Area, Netherlands
Information Technology and Services
Python, Big Data, Scalability, High Availability, Performance
Senior Software Engineer and Architect with more than 8 years experience.
Strong in critical thinking, problem solving and high performance architectures.
Paolo Iannelli Labs Rss

How To connect to Virtual Machines (VMWare) using VNC

Posted on : 16-07-2011 | By : Paolo Iannelli | In : System Administration, Virtualization

Tags: , , , , , , , , , , , , , , , , , ,


If you need to connect to a Virtual Machine but you cannot use the VMWare console for different reasons (for instance you are travelling and you have only your macbook pro with you, that doesn’t run VMWare vSphere), you might be interested in this how to.
You will be able to connect to a virtual machine, simply using a VNC client like RealVNC or UltraVNC, as soon as the virtual machine is running.

To achieve this, your virtual machine needs to be turned off and you should go to the settings page.

Go now to Options -> General -> Configuration parameters… and add 4 new rows :

  • RemoteDisplay.vnc.enabled = TRUE
  • RemoteDisplay.vnc.key = leave empty, will be auto-filled
  • RemoteDisplay.vnc.password = 8 characters password
  • RemoteDisplay.vnc.port = anything between 5000 and 5999

Once you filled up all the fields, you may click OK and start the virtual machine.

Using a VNC client, you should be able to connect now to the VM using the VM Host ip address (or FQDN) and the port specified, along with your 8 bytes password.

Although this is a cool feature, you have to take in account that VNC uses a week password encryption protocol and that VNC traffic is sent thru the network unencrypted. You may connect to VNC also tunneling through a SSH connection, but this is not part of this tutorial.

Briefly, I would recommend to use this functionality only if you plain to encrypt data via the above-mentioned tunnel or when you have no other choices rather than the official VMWare management console (that encrypt communication using SSL certificates). It might also still be appreciable to use this feature only on private environments, where no data is exposed to the Internet.
I hope this post was useful  and if you have any questions, just let me know!

Running ESXi 4 inside ESXi 4

Posted on : 22-03-2011 | By : Paolo Iannelli | In : System Administration, Virtualization

Tags: , , , , , , , , , , ,


Today I had to test a setup of ESXi 4 but I didn’t have any physical server to test, so I decided to virtualize ESXi 4.1 in my existing ESXi 4.1 instance.
It took a while, browsing VMware knowledge base and some forums, but then was even easier than what expected.

In this short post I will make you a simple list of what to do to get everything working in a snap of fingers.

Before you start : bear in mind that you can’t launch 64 bit machines virtualized in the already virtualized ESXi server. This is a known limitation.

So if you plan to create only 32 bit VMs, this tutorial is fine for you.

To begin, you need to create a Virtual machine with at least the following specs :

  1. 2 CPU
  2. 2 Gb RAM (with less you can’t install ESXi)
  3. 1 or more NICs of type E1000 (flexible or VMXNET2/3 won’t work)
  4. SCSI bus Logical Parallel or Logical SAS (no paravirtualized)
  5. Allocate a good amount of disk space for the datastore.
  6. Set Guest Operating System to Red Hat Linux version 5 or 6, 64  bit.

After you created the virtual machine go in :

Edit Settings -> Advanced -> General -> Configuration Parameters

click Add Row and set monitor_control.restrict_backdoor to TRUE

Go now in the vSwitch properties relative to the virtual machine you just created and under the Security  tab enable the Promiscous mode (Accept)

Now you can install your ESXi host simply mounting the ISO image as usual. Once installed you can either attach the server to an existing vCenter instance or use the server as standalone.

In short :

  • You create the VM as above
  • Set the configuration parameter specified
  • Configure promiscous mode
  • Install and use the ESXi host !


Why would you do that?

Well in some cases it may sound OK to test some functionality of ESXi (getting familiar with CLI or API for instance) without having a real hardware for it. I think is enough as a valid reason, isn’t ?

Remember one thing : try always to change the MAC address of the created VMs inside the virtualized ESXi instance else you may get a MAC address conflict and loose connectivity on one of the affected VMs.

If you have any question just leave me a comment below !