OpenNebula 3 Cloud Computing by Giovanni Toraldo – A quick review

Open Nebula documentation is quite clear and is full of great examples so it’ll help you to install your cloud, but you may find useful this book published by Packt: OpenNebula 3 Cloud Computing by Giovanni Toraldo. I read it after installing my Open Nebula (I’m preparing my guide for CentOS and Open Nebula 3.8 ) and it helped me to understand better some Open Nebula concepts.

I read the first six chapters (in my Safari Books subscription) and in my opinion the writer provides a fine step-by-step guide to get your cloud infrastructure running with many different hypervisors and storage options. If you use the book to install Open Nebula and you’re an Ubuntu user you just can copy/paste the apt-get install commands, but don’t worry if you use any other GNU/Linux distributions you’ll only have to find the right packages for your favourite distribution.

As OpenNebula is evolving quickly you’ll find that some commands shown in the book  have different parameters (I think the author used the 3.4 version), but with little effort you will be able to follow the guide for the 3.6 version.

Installing KVM with yum… and compiling Libvirt and Virt-manager

I want my N40L server to host virtual machines,so KVM will be my solution. It’s so easy to install in CentOS 6 with yum:

yum install qemu-kvm qemu-kvm-tools uml_utilities

I’ll need some tools to manage my virtual machines: virt-manager, virtinst and virt-viewer offered by RedHat Emerging Technology. These tools need the libvirt API (also offered by RedHat Emerging Technology) to interact with KVM. You can install all these packages with yum:

yum install libvirt virt-manager

And you’re done! … but I have one problem. Thanks to this post at Binary Bit Me blog, I found that the bridge compatibility mode (brcompat) is not longer needed if you use libvirt >= 0.9.11 but CentOS 6.3 offers you 0.9.10 version 😦 so why not compiling libvirt and virtual manager tools as well (maybe I can test it later)? It’s quick and easy using the README and INSTALL files.

— Libvirt 0.10.1 —

Download libvirt from the libvirt web site or with git. You’ll need some CentOS packages.

yum install gnutls-devel device-mapper-devel python-devel libnl-devel yajl-devel libxml2-devel
./configure --prefix=/usr --with-yajl
make
make install
ldconfig

Update: 26/11/2012

One thing was missing.

I tried to use virt-manager as a non-root (e.g oneadmin user for OpenNebula) user and the following error appeared: “Unable to connect to libvirt: authentication failed: Authorization requires authentication but no agent is available.”. If you want any other user than root can use libvirt, you’ll have to:

  • create a libvirt group
  • add that user to the libvirt group
  • modify the libvirtd.conf so unix sockets are owned by libvirt group

You have all the information in the Antarktikos blog.

Updated: 29/12/2012.

libxml2-devel is also needed. Thank you Kolmis.

— Virtinst —

Download virtinst from Virt Manager web site, and use python to install them.

python setup.py install

— VirtManager 0.9.4 —

yum install intltool PackageKit-gtk-module
wget http://virt-manager.org/download/sources/virt-manager/virt-manager-0.9.4.tar.gz
tar xvfz virt-manager-0.9.4.tar.gz
cd virt-manager-0.9.4
./configure --prefix=/usr
make
make install

— Virt Viewer —

yum install spice-gtk-devel gtk-vnc-devel
wget http://virt-manager.org/download/sources/virt-viewer/virt-viewer-0.5.4.tar.gz
tar xvfz virt-viewer-0.5.4.tar.gz
cd virt-viewer-0.5.4
./configure --prefix=/usr
make
make install

I’ll try to generate rpm packages but I’ve no more time today 😉

And here’s my virt-manager running!.
In a few days… OpenNebula will run in my N40 Lab.