Skip to content

Single System Test Cloud

September 16, 2012

UPDATE: I’ve posted an easier way to do this. Check out my other post Single System Test Cloud, Take 2 for the instructions.

When first trying out Eucalyptus, the requirement of having two systems at a minimum can become a blocker. What if you only want to test out running a couple VMs? Well for that use case a system such as the ECC might be just fine. But what if you are looking to try out the installation process or see what a Cloud Administrator needs to deal with? For this, it would be nice if a single machine could be used for some basic testing and if those tests are good then more resources could be purchased for a more proper proof-of-concept configuration. My coworker Graziano tried this out by using two VMs in his blog Developer Cloud but that requires that your CPU allows for nested virtualization.

For a single system configuration the Eucalyptus Front-end (CLC, Walrus, CC, SC) will be installed in a VM on the bare metal host that will run the Eucalyptus NC. A private network subnet will be setup that only the bare metal system and the VM can use to communicate. Two bridges will be used for the communication between the front-end (VM) and the NC (bare metal).

First start off with a stock CentOS 6 installation on your bare metal system. Install and setup KVM and libvirtd. Also make sure that you have enough room for a VM to run a Eucalyptus front-end (50GB minimum) along with any instances that you might wish to run (50GB minimum).

To allow for us to use the MANAGED-NOVLAN networking mode we will be setting up two network bridges. One of these bridges will be our public network and the other will be our private network. The IP addresses and subnet should not be routed on the rest of the network. For example, if we were going to have the interface br0 use the IP address with a netmask of we would use the following configuration:


To make sure that the Eucalyptus VM has access to the Internet will need to make sure that we have a NAT setup. First add the following IPTables rules (Note: You may need to change the interfaces if you system is not setup in the same way):

/sbin/iptables -A FORWARD -i br0 -o em1 -j ACCEPT
/sbin/iptables -A FORWARD -i em1 -o br0 -m state --state RELATED,ESTABLISHED -j ACCEPT
/sbin/iptables -t nat -A POSTROUTING -o em1 -j MASQUERADE

Next the bare metal system needs to forward packets. To do this edit /etc/sysctl.conf and make the following edit:

net.ipv4.ip_forward = 1

To make sure that we have a fully functioning cloud that we can use all of the available features with we need to shut off Zeroconf which causes issues with the metadata service of Eucalyptus. To do this add the following to /etc/syconfig/network


Now restart networking and the Eucalyptus VM will now be able to access the Internet (that is if it is currently accessible by the other machines on your network).

service network restart

Now a CentOS 6 VM will need to be installed on the bare metal system. When setting up the VM both of the bridges will be used as interfaces for the VM. The defaults of the installer will work. You will want to use a static address for the networking. Below is an example libvirt XML file:

<domain type='kvm'>
  <memory unit="GiB">2</memory>
  <description>Front End</description>
  <cpu match='exact'>
    <feature policy='require' name='vmx'/>
    <type arch="x86_64">hvm</type>
    <boot dev='hd'/> 
  <clock sync="localtime"/>
    <disk type='file' device='disk'>
      <source file='/media/extra/frontend.img'/>
      <target dev='vda' bus='virtio'/>
    <disk type='file' device='cdrom'>
      <source file='/media/extra/CentOS-6.3-x86_64-minimal.iso'/>
      <target dev='hdc'/>
    <interface type='bridge'>
      <source bridge="br0"/>
      <mac address='00:16:3e:21:52:45'/>
      <model type='virtio'/>
    <interface type='bridge'>
      <source bridge="br1"/>
      <mac address='00:16:3e:21:52:46'/>
      <model type='virtio'/>
    <serial type='pty'>
      <target port='0'/>
    <console type='pty'>
      <target type='serial' port='0'/>
    <graphics type='vnc' port='-1'/>

Note: You may need to change the MAC addresses above if these two already exist on your network. Using MAC addresses from the 00:16:3e:XX:XX:XX pool will be a safe bet as these are registered to be used by VMs. This blog post here has some more information if you are interested.

After the VM’s OS is installed, follow the Eucalyptus Installation Guide to install all components (CLC, CC, SC, Walrus) on the VM. Install the Eucalyptus NC on the bare metal system.

When Eucalyptus is setup and running on the VM add the following IPtables rules to make sure that you are able to access the API and WebUI from the bare metal host.

iptables -t nat -I PREROUTING 1 -p tcp -i em1 --dport 8443 -j DNAT --to-destination **VM_IP**:8443
iptables -t nat -I PREROUTING 1 -p tcp -i em1 --dport 8773 -j DNAT --to-destination **VM_IP**:8773

Now a fully functioning cloud should be setup and ready for you to try out.


From → Cloud, Eucalyptus

  1. Abhijit permalink

    hi, this is abhijit..
    i setting up a private cloud using three pc for my final year project.
    on 1st pc which has ubuntu 12.04 server , i installed clc and walrus …
    on 2nd pc which has ubuntu 12.04 desktop, i installed sc and cc..
    on 3rd pc which has ubuntu 12.04 desktop , i installed nc..
    i have installed it separately now i am going to create network..
    but i dont know from where to start..?how to check connection?whether components installed correctly or not?are components running on correct port or not?
    pls help me to find out this………..

    • Hi,

      The best place to start for this information would be the installation guide found here: Download the PDF and read through it. It will provide you with information on everything you asked above. If you’re still having issues then you could join IRC Freenode and the #eucalyptus channel. If you prefer email then I would suggest emailing the Eucalyptus community list at community [at]

      Hope this helps.


Trackbacks & Pingbacks

  1. Single System Test Cloud, Take 2 « Technological Musings

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: