WorkingInT2BCloud: Difference between revisions

From T2B Wiki
Jump to navigation Jump to search
Line 122: Line 122:


==== instantiate your VM ====
==== instantiate your VM ====
[[File:Create_Instantiate_opennebula.jpg| 1000px]]
# Back to the table showing all the templates, select the newly created one and...
# ...click on button “Instantiate”

Revision as of 16:35, 1 September 2015

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 :

http://192.168.10.35:9869/

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

  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.

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

  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

  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

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

  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

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

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

Template: Context

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


Template: Context

  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”.
    • PUBLIC_NETWORK_AVAILABLE = \"new\"
  1. This was the last step ! You can click on button “Create”.


instantiate your VM

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