Move your VMware and KVM applications to the cloud without making any changes

  • July 14, 2015

How to setup DHCP for 2nd level guests running on ESXi in Ravello

As most of you probably know besides implementing a hypervisor merely capable of running regular VMs, we’ve also implemented a CPU virtualization extensions called VT-I for Intel or SVM for AMD cpus. These extensions, in essence, allow running other hypervisors such as KVM or VMWare’s ESXi on top of Ravello. In this blog I’m going to focus on using DHCP for the 2nd level guests running on ESXi. This blog is optional in case you do not want to use only static IPs for 2nd level guests.


This article describes how to use DHCP for the 2nd level guests running on ESXi in Ravello. In Ravello, DHCP is not available for 2nd level guests by default. The reason for that is that Ravello system is totally unaware of those 2nd level guests and those guests cannot reach Ravello’s built-in DHCP server by broadcasting DHCP DISCOVER packets. DHCP requests from i 2nd level guests, will not be answered and therefore the guest OS will not receive a DHCP address. In order to use DHCP in the 2nd level guests, you will need to:

  1. Define the networking in your Ravello Application and vSphere environment for supporting another DHCP server.
  2. Install and configure your own DHCP server VM as a 2nd level guest to service the other 2nd level VMs.

There are few ways how to do those. This blog describes how to do both the easiest way.

Defining the networking in Ravello to support another DHCP server

There are two important factors that need to be in mind when defining the networking:

  1. The new DHCP server should respond only to the the 2nd level guests.
  2. The 2nd level guests should get responses only from the new DHCP server.

Here is an example how to do so:

  1. For each ESXi node in your Ravello Application, add (at least) one NIC dedicated to a separate network that will be used only by those 2nd level guests:
    1. Set a reserved DHCP IP or a static IP for the NIC on the ESXi running guests. Do this for all ESXi running guests in such a way all IPs will be in the same network.
    2. In my example, I have 2 ESXi machines with 2 NICs. The first NIC is using the default Ravello’s network (10.0.x.x). The 2nd guest is using a new network (20.0.x.x) because I have set the reserved DHCP IP of the 2nd NIC to and
    3. You can look at the settings of the NICs here:

  2. For each ESXi, add another VM network for this NIC:
  3. Set the guest networking to use only this NIC:

Installing your own DHCP server

You can use any DHCP you prefer. In this blog I will describe how to install ISC DHCP server on a vanilla Ubuntu machine. In addition, due to the network topology I selected in this example, the new DHCP server will be another VM in Ravello’s application connected only to 20.0.x.x network.

  1. Deploy a new Ubuntu machine in your Ravello Application and give it a static IP/reserved DHCP IP in the 20.0.x.x network. In my example I have used reserved DHCP IP
  2. Make sure your repositories are updated sudo apt-get update
  3. Install the ISC DHCP server sudo apt-get install isc-dhcp-server
  4. Enable packet forwarding - sudo vi /etc/sysctl.conf and remove the comment from net.ipv4.ip_forward=1
  5. Reboot the DHCP server machine to enable packet forwarding sudo reboot
  6. Make your DHCP server to act as a DNS as well - sudo apt-get install bind9
  7. Edit the DHCP settings - sudo vi /etc/dhcp/dhcpd.conf and perform the following (note that in my example here the IP of the DHCP server is
    1. subnet netmask {
      range; # you can set any range in the network as you prefer
      option routers;
    2. option domain-name-servers;
  8. Restart the DHCP service sudo /etc/init.d/isc-dhcp-server restart

The overall networking of your Ravello application should look something like this:

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.