From T2B Wiki
Jump to navigation Jump to search

Golden rules

  • Before starting, please read the doc
  • Never, ever, change the status of a VM using virt-manager ! Do everything using Sunstone only, and nothing else !
  • Admin tasks on OpenNebula : most of them requires that you become oneadmin ("su - oneadmin").

Admin tasks

How to stop OpenNebula ?

Connect as root to the front-end machine, and type the following commands :

su - oneadmin
sunstone-server stop
oneflow-server stop
econe-server stop
one stop

How to start OpenNebula ?

Connect as root to the front-end machine, and type the following commands :

su - oneadmin
one start
sunstone-server start

Using Sunstone front-end

Connecting to the Sunstone front-end

The Sunstone front-end is installed on dom02. Open a "socks" port to qnat or ccq (or configure your FoxyProxy) to connect to the the following URL :

You will be asked a login and a password.

Creation of VMs

To create a VM, you have to follow the following steps :

  1. creation of a disk
  2. creation of a template using the disk created previously
  3. instantiation of the template to create the VM

In the following explanations, we will suppose that you want to create a new VM that you want to deploy with Quattor.

Creation of the disk

Create disk opennebula.jpg

  1. Choose type “DATABLOCK” because you just want a drive (not a CDROM iso, neither a disk with preinstalled OS).
  2. “Persistent” means the content of the disk image is preserved when the machine is shut down.
  3. You want an empty drive
  4. Disk size in MB
  5. Enable the advanced option to go to the next screen.

Advanced disk opennebula.jpg

Set the device prefix to “vd”. This will enable the virtio driver (otherwise VM performance are very poor). Don't forget to change the disk name accordingly in the hardware template in the SCDB. For example :

'harddisks' = dict('vda', create('hardware/harddisk/sas_generic', 'capacity', 60*GB));

Next, click Create. Now your disk is ready and we can apply an opennebula template on it.

Creation of the Template

Template: General

Create template opennebula.jpg

  1. We are using KVM hypervisors.
  2. VCPU should only be used if you want to “pin” some cores of the hypervisor to your VM, the result being better performances.
Template: Storage

Create template disk opennebula.jpg

  1. “Disk 0” is created automatically as a default, but...
  2. Now, associate it with the disk image you just created (select it in the table).
  3. Display the advanced options

Create template disk 2 opennebula.jpg

  1. Again, set the device prefix to “vd” to enable virtio driver for better performances.
  2. Disable disk cache for better performances
Template: Network

Create template network opennebula.jpg

  1. By default, “interface 0” is automatically created. Click on the blue button “Add another nic” if you need more network interfaces.
  2. For each nic created in the previous step, select the virtual network in the above table.
    1. The usage in the T2B is to place the first nic in the public network (Public_T2B_Fullrange)
    2. And the second nic in the private network (Private_T2B_Fullrange).
  3. Display the advanced options (see next slide for explanations).
  4. Set the IP addresses of the nics (don't forget to do it for all the nics defined in the previous step !). The model should be “virtio” for better performances.

Template: OS Booting

Create template booting opennebula.jpg

If you want to install the machine with Quattor, it is very important to choose the network as the first boot device, and the hard drive as the second one.

Template: IO

Create template IO opennebula.jpg

Choose “VNC” to be able to interact with your VM.

Template: Context

Create template Context opennebula.jpg

Unselect the contextualization check-boxes (we don't need it because Quattor will do the job).

Template: Context

Create template Shedulling opennebula.jpg

  1. The scheduling is the step where OpenNebula is selecting an hypervisor to host the VM. In our T2B cloud, some hypervisors are connected to the old public network, and the others are connected to the new public network. If your VM will be in the new public network, you must tell explicitely the scheduler to choose the hypervisor accordingly.
  • Remark : PUBLIC_NETWORK_AVAILABLE is custom attribute that we have set for each host. Possible values are : “old” and “new”.
  1. This was the last step ! You can click on button “Create”.

instantiate your VM

Create Instantiate opennebula.jpg

  1. Back to the table showing all the templates, select the newly created one and...
  2. on button “Instantiate”