Skip to content

Opennebula

Install opennebula

Plain installation means setting up a head and worker nodes. Also you might want to setup sunstone, a gui that seems nice, but has the old problem of just greying out buttons without telling what the problem is. So i will focus on command line.

See opennebula_install for more on installation

Sandbox VM

To get started really quick download a complete vm from here visit

Though it is generally the idea to install one head node and several worker nodes, i only have access to one machine, so i only install the head, and that is also it's first/only node.

First install centos 7 onto the machine, and test if it is capable of virtualization extensions :

grep -E 'svm|vmx' /proc/cpuinfo Let's assume you get some result from that, continuing without is somewhat pointless. We are going to use commandline mostly, but it won't hurt to install sunstone (the GUI) as well, if only for nice lists etc and to view your actions.

now install one with

install opennebula
yum update
yum install opennebula-server opennebula-sunstone

And run install_gems to install all the gem dependencies. Choose the CentOS/RedHat if prompted:

install gems
/usr/share/one/install_gems

password

The password for opennebula and the interface (opennebula-sunstone) is maintained at two places :

  • the internal database
  • the file ~oneadmin/.one/one_auth (or.. the file set by $ONE_AUTH)

As you imagine the latter one is use for command line commands. The first is used by the web interface but also the cli.

For instance, out of the box this will work :

open nebula user list
oneuser list

will give

| ID NAME GROUP AUTH VMS MEMORY CPU | 0 oneadmin oneadmin core - - - | 1 serveradmin oneadmin server_c 0 / - 0M / - 0.0 / -

But when you either change the entry in ~oneadmin/.one/one_auth OR the database using the web interface or:

oneadmin
oneuser passwd 0 anderpassword

(o is usually oneadmin..) You will get errors on the command line, they have to be changed both, and of course match. And don't do the file first because you can't use the command anymore (... duh!!)

Virtual resources

There are 4, one of which is very clear : network.

The other ones are woven into each other.

  • network, seems clear to me
  • images which represent physical objects like CDROM's and hard disks (DATABLOCKS).
  • templates are files with the attributes that make a virtual machine
  • VM's which are running instances, based on templates

So a template could point at image : centos7 and you can just as easy startup two vm bases on that template. If you don't use a cloned disk (but persistent) both are writing in the same image. In the same sense you can use an image in two templates, and the same will happen, so clone a lot !

VM installation

Ok, this is not as straightforward as you would expect, a good guide to this is : visit which I will repeat here in very short version.

  • create a readonly CDROM image with the iso to install
  • create a persistent DATABLOCK for the harddisk containing the OS
  • create a template with cdrom and HD attached
  • instantiate the template and install the os on the HD
  • remove the vm...because it is now installed on the HD of the template.
  • change the type of the harddisk image from DATABLOCK to OS
  • instantiate (a) vm(s) using the template just created