Galactic Civilizations 3
Install and configure Opennebula

Install and configure Opennebula

Category: Administration.
Posted by on the 06/08/2013.
Last update on the 06/08/2013.


This tutorial explains how to install and configure Opennebula in order to dispose of cloud architecture.


This tutorial is intended for people under Debian or distributions based on it (Ubuntu, Xandros ...). All commands in this tutorial are executed as root. (su command). It requires that your servers support virtualization.

Warning: To know if your processor has the required functionalities, this one must have the flag svm (for CPU AMD) or vmx (for CPU Intel). To know if these flags are presents, execute the following command:

egrep --color "(vmx|svm)" /proc/cpuinfo

If none of these flags are present, this means that your processor does not support the instructions linked to the virtualization or that this functionality is deactivated in the BIOS therefore, you need to activate it during the starting of your server.

Download of Opennebula

Before starting the installation, we need to download the last version of opennebula. To do that, go to the following address: and choose the package type that you need.

For this tutorial, I have downloaded the version: debian amd 64.

The oneadmin user

You need to create the user and group oneadmin. These ones will be used by Opennebula to manage the virtual machines on the different hosts.

$ sudo addgroup --gid 1001 oneadmin
$ sudo adduser --ingroup oneadmin --uid 1001 --home /var/lib/one oneadmin

You need also to add the oneadmin user to the libvirt group in order to have the authorization to manipulate the libvirt library during the start of the virtual machines.

$ sudo adduser oneadmin libvirt

libvirt is a library that allows to interact with the virtual environment like KVM or VMWare.

Installation and configuration of Opennebula

To install Opennebula execute the following command:

$ sudo dpkg -i Debian-6.0.2-opennebula_3.4.1-2.1_amd64.deb

It is recommended to install all the gems in order to use all the functionality of Opennebula.

$ sudo ruby /usr/share/one/install_gems

To avoid having to specify the bridge to use every time you create a virtual network, we can define a default bridge in the template of the network.

$ sudo nano /etc/one/occi_templates/network.erb


<% end %>
BRIDGE = br0

We can now connect as oneadmin.

$ su -l oneadmin

Now, we will change the password of Opennebula. (This password must be the same as the password of the oneadmin user).

$ oneuser passwd 0 oneadmin
$ echo "oneadmin:oneadmin" > /var/lib/one/.one/one_auth
$ echo "oneadmin:oneadmin" >> /var/lib/one/.one/occi_auth
$ echo "oneadmin:oneadmin" >> /var/lib/one/.one/sunstone_auth

After, we will allow Opennebula to connect via ssh without sending the oneadmin password. To do that, execute the following commands:

$ cat /var/lib/one/.ssh/ >> /var/lib/one/.ssh/authorized_keys
$ nano /var/lib/one/.ssh/config


Host *
StrictHostKeyChecking no

Now that we have finished configuring Opennebula, we can restart it. To do that, execute the following command:

$ one stop
$ one start

Test of Opennebula

Now we will execute Opennebula command for example the one that allow creating new host where the virtual machines will be stored.

$ onehost create nomHote -i im_kvm -v vmm_kvm -n dummy

We can now display the available hosts of Opennebula with the following command:

$ onehost list

You like this tutorial ?
Like this website in order to promote it on facebook !

You like this tutorial ? Share it with your friends !
Partager sur Facebook Partager sur Twitter Partager sur Myspace Partager sur Stumbleupon Soumettre sur Reddit Partager sur Digg Ajouter à vos favoris Technorati Ajouter à vos favoris Live Ajouter à vos favoris Google Ajouter sur vos favoris Yahoo