Running OpenStack Compute (Nova) in a Virtual Environment

If you'd like to set up a sandbox installation of Nova, you can use one of these Live CD images.

If you don't already have VirtualBox installed, you can download it from http://www.virtualbox.org/wiki/Downloads.

Installing Nova Using Vagrant and Chef

Check out SingleNodeNovaVagrantChef on using Vagrant cookbooks from https://github.com/ansolabs/openstack-cookbooks to install Nova in a virtual environment from the command-line.

Complete Guide to installing OpenStack Compute (Nova) on VirtualBox

This blog post with accompanying video takes you through configuring VirtualBox and installing OpenStack for a complete sandbox environment to allow for multi-node development accesible from your host running VirtualBox: http://uksysadmin.wordpress.com/2012/03/28/screencast-video-of-an-install-of-openstack-essex-on-ubuntu-12-04-under-virtualbox/

Pre-installed Nova on VMs

Download the zip or iso file and then follow these steps to try Nova in the virtual environment.

http://c0047913.cdn1.cloudfiles.rackspacecloud.com/OpenStackNova.x86_64-2010.1.2.iso (root password is "linux" for this image)

http://c0028699.cdn1.cloudfiles.rackspacecloud.com/OpenStack Bexar.vmdk.zip (~400 MB) (log in information is stacker/stacker)

Note: This image is running Bexar, which has a known bug with running nova-volume (https://bugs.launchpad.net/nova/+bug/713430).

You can download the Stackops Distro, which is a standalone iso, from http://sourceforge.net/projects/stackops/files/.

Running on VirtualBox

Here are some screenshots showing how to set up the .vmdk from the nova-vm.zip in VirtualBox.

Launch VirtualBox.

Click New.

In the VM name and OS type, click Continue.

In the Memory page, use these settings.

width=100

In the Virtual Hard Disk page, use these settings.

width=100

In the Summary page, click Done.

width=100

Now you have a new virtual box in your listing. Start it by double-clicking it.

Once it's started, here are the basics:

  1. Start the VM
  2. Login to Ubuntu ID stacker Password stacker
  3. Switch to the /home/stacker/openstack/nova/contrib directory to run the nova.sh script.

    cd  /home/stacker/openstack/nova/contrib
    ./nova.sh run
  1. You'll see several screens. If you have problems with getting an EC2 key, switch to running as root.

width=100

If nova is already running, use screen -ls, and when the nova screen is presented,then enter screen -d -r nova.

These are the steps to get an instance running (the image is already provided in this environment).

 euca-add-keypair test > test.pem
 chmod 600 test.pem
 euca-run-instances -k test -t m1.tiny ami-tty
 euca-describe-instances

 ssh -i test.pem root@10.0.0.3

To see output from the various workers, switch screen windows with Ctrl+A " (quotation mark).

width=100

When you want to properly shutdown all the Nova services, the script helps you do this with:

./nova.sh terminate

Reference Info

For zip file: OS version Ubuntu 64bit Server Edition 10.04

OpenStack version - using Bexar release from launchpad circa Feb. 2011 - using nova.sh

Directory of Nova /home/stacker/openstack/nova

Account name ID stacker Password stacker

For iso file:

OS version OpenSUSE 11 sp1

OpenStack version - using Nova 2010.1 release

Account name ID root Password linux

Software vs Hardware Virtualisation

Note For Intel VT-x Machines - nested kvm isn't currently supported ( as of 15th Feb 2011) which means your instances may fail with the following message

(nova.exception): TRACE: libvirtError: internal error no supported architecture for os type 'hvm'

Add the following line to nova.conf:

--libvirt_type=qemu

For AMD-V ensure nested support is enabled on your host running VirtualBox. For ubuntu ensure that /etc/modprobe.con/kvm_amd.conf has the following

options kvm_amd nested=1

Wiki: NovaVirtually (last edited 2012-03-28 09:42:14 by uksysadmin)