Rackspace OpenStack Installation on a KVM VM

Rackspace OpenStack Installation on a KVM VM

OpenStack


Rackspace OpenStack Installation on a KVM VM: Big day in the OpenStack world, Rackspace announced it was releasing its Openstack installer image named Alamo v1.0. running on top of KVM, along with Opscode Chef and Rackspace OpenStack cookbooks. This may be the Open Source renaissance we have been needing and forced into by exorbitant profit taking, M&A, takeovers, buyouts, spin-ins, spin-offs, spin-outs, IPOs and greedy margins during times of economic uncertainty. Never fear my young republican, there is profits to be made here on by monetizing open source software, but they will be earned with value, partnerships with customers and risk.

We are entering a new era of choices thanks to the decoupling of the virtual from the physical. Rackspace and the entire community has released a very straightforward, yet flexible packaged install. The open source community has done a very nice job of simplifying the installation in what 12 months ago only the strong of heart would attempt. Open Source will win because it isn’t about how much money you have or how much you talk, it’s about contributing code and doing rather than talking.

False Alarm

I must admit when I saw the Twitter buzz this morning after a 3 hour nap and it was, Rackspace offering free access to their cloud resources. I was excited to think they were nailing up tunnels on their public cloud with a client integration peice. We would finally see some real hybrid cloud computing not just handwaving we are accustomed to from, well most. For years we have been hearing it all the while knowing how unrealistic it is without tunnels, orchestration and most importantly disruptive leadership from outside the traditional infrastructure vendors namely the consumers. We are not quite there yet, but getting very close.

Crunch Time

In just the past couple of weeks RedHat, IBM, likely Dell (were very strong initially then keeping options open) and Microsoft have all thrown in their hats (again). CloudStack may be on the verge of getting consumed but alternatives are nice.

After I realized I was getting a free VM instantiated in the cloud quite yet I went ahead and pulled down the package and chose to do the install on a box running KVM. I was going to install the Rackspace Openstack all in one on a VM. They had very nice instructions up until I hit the KVM nested hypervisor support. Not sure if their documentation got a little squirrely because  out of the box on Ubuntu 12.04 QEMU/KVM doesn’t support Virtual Distributed Ethernet (VDE) nor nested Hypervisors (A Hypervisor inside a Hypervisor). Not a problem we can work around those things! Disclaimer this isn’t a knock on the documentation from Rackspace, just how I got things up and running it is certainly possible I missed something all together. Overall their docs were very nice.

Network Preparation

I used the same IP scheme the how-to did in the how-to.

IP Address: 10.80.1.1
Network: 10.80.1.0
Broadcast: 10.80.1.255
Netmask: 255.255.255.0
DNS1: 8.8.8.8

This next part ids line from line from their docs, I recommend using those for it here.

apt-get install uml-utilities
tunctl -t tap0
ifconfig tap0 up
ifconfig tap0 10.80.1.1 netmask 255.255.255.0
apt-get install vde2 libvde-dev libvdeplug2-dev
vde_switch --sock /tmp/vde_tap0.sock -d --tap tap0
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -I INPUT 1 -i tap0 -j ACCEPT
iptables -A FORWARD -i tap0 -s 10.80.1.0/255.255.255.0 -j ACCEPT
qemu-img create -f qcow2 rackspacecloud_controller.qcow2 30G

When I went to spin up the VM that part failed because of two reasons for me. QEMU/KVM does not by default build in Ubuntu 12.04 have VDE compiled nor nested hardware virtualization support.

Re-compile QEMU with VDE support.

#Download QEMU v1.1.1 (or any version that supports VDE)
wget http://qa.debian.org/watch/sf.php/kvm/qemu-kvm-1.1.1.tar.gz
#Unpack
tar -xvf qemu-kvm-1.1.1.tar.gz
cd qemu-kvm-1.1.1
#prepare with VDE support and the output to /usr/local/bin
./configure --enable-vde --prefix=/usr/local/bin
#make/install
make && make install
#Check version if no errors.
/usr/local/bin/qemu-system-x86_64 --version
#QEMU emulator version 1.1.1 (qemu-kvm-1.1.1), Copyright (c) 2003-2008 Fabrice Bellard
#That will not replace the old v1.0 QEMU btw.

If later you get an error about QEMU “expects a network client type” you either didn’t get VDE compiled in or you are running the default Ubuntu QEMU v1.0

Adding Hardware Virtualization Support to a VM in KVM – Nested Hypervisor

#Unload and reload kvm-intel kernel module with nested support.
modprobe -r kvm-intel
modprobe kvm-intel nested=1
cat /sys/module/kvm_intel/parameters/nested
Y (Y for yes, may already be supported in the KO)

Boot the ISO with Nested Hardware Virtualization support. If you get
This is slightly different from the Rackspace guide. The difference is in the form of that loads the VMX HW virt support for the VM.

-enable-kvm -cpu qemu64,+vmx

The ability to run nested KVM hypervisors is extremely important for lab environments for test/dev. For some reason KVM pulled support a while back but this is a work around for now written by IBM. More on it in a Sigg here and the code review from the legend himself Torvalds Github.

export CONTROLLER_UUID=uuidgen
export CONTROLLER_MAC=printf '52:54:BE:EF:%02X:%02X\n' $((RANDOM%256)) $((RANDOM%256))
/usr/local/bin/qemu-system-x86_64 -enable-kvm -cpu qemu64,+vmx -uuid $CONTROLLER_UUID -drive file=rackspacecloud_controller.qcow2,if=virtio -cdrom alamo-v1.0.0.iso -boot d -m 8192 -net nic,macaddr=$CONTROLLER_MAC,model=virtio,vlan=1 -net tap,vlan=1 -net vde,sock=/tmp/vde_tap0.sock,vlan=1 -vnc :1 &

If you get errors when you try and run the qemu-system-x86_64 command they are likely missing the VMX support. If no errors, open vnc and attach to your public interface ip on your physical hardware followed by a colon 1 eg. ‘into vncviewer ex”172.31.249.5:1″.

GUI installation


Figure 1. Install Options. All in one or multiple nodes.

Choose Controller “All-in-One” if you only want to mess with one node or else mix a controller and compute nodes. That is an alternative in the install. The only mildly unclear thing if new to OpenStack would be the fixed-range. Fixed range is your backend network. That would be a seperate network than the one your ip is on with the TAP into the physical host. The tap0 you made in the beginning and adding the IP masquerading allows you to share that address with your physical and VM hosts.


Figure 2. Add an IP on the same IP range as the VDE tap0 you made earlier.


Figure 3. At anytime hitting escape will get you to here and you can bounce the image and start over.


Figure 4. Installing Chef


Figure 5. Post Install

After it is complete if you can figure out how to send control+function+alt+F2 on a mac over a terrible VNC viewer build you beat me. I just sshed to the box from there.

ssh to the VM controller node using the user name you entered during the install to the IP you entered (10.80.1.2).
ssh @10.80.1.2
You can also get to Horizon/Dashboard Web UI now.

http://10.80.1.2

The rest is documented very well here -> http://c421178.r78.cf1.rackcdn.com/rackspace-private-cloud-gettingstarted.pdf


Figure 6. When you type ‘export’ it should look something like this if you add source .novarc.
After you ssh make sure you do these two things to get your ENVs right.

sudo -i
source .novarc


Figure 7. ‘glance index’ show the images loaded.

The rest is getting familiar with the operational components of OpenStack.
More than just to the cloud it has the potential of pooling compute, storage and network resources across partnerships, business units, government entities etc to further find cost savings and efficiency vis a vi consolidation. Amazing stuff, easy way to blow out lots of different mixes and matches of your own private cloud that someday soon will be able to elastically burst to an Openstack cloud provider. Which will be nice and nasty, full of tunnels and MTU problems over incompetent LEC networks and we may very well kill the Internet. See more jobs, not less :)

About the Author

Brent SalisburyBrent Salisbury works as a Network Architect, CCIE #11972. He blogs at NetworkStatic.net with a focus on disruptive technologies, that have a focus on operational efficiencies. Brent can be reached on Twitter @NetworkStatic.View all posts by Brent Salisbury →


  1. hello JOJO kindly deliver me a video on the best ways to make pcb utilizing laser printer and ferric chloride.