Table of Contents

OpenNebula 4.4 Sandbox Testdrive

Overview

The VM is a CentOS 6.3 with the OpenNebula 4.4 packages installed and configured, and ready to also act as cloud host to execute virtual machines. When the VM starts all the main services are started:

Quick Overview of the CLI Interface

OpenNebula runs as the oneadmin user, and the main administrator should run commands as that user, therefore the first thing you need to do is to switch to oneadmin:

<xterm> $ su - oneadmin </xterm>

From the oneadmin account you can see all the already bootstrapped resources:

<xterm> # one-sandbox is configured as a worker node and monitored $ onehost list

# There is one network created $ onevnet list

# You can see the leases and the specific configuration of the network $ onevnet show 0

# A TTYLinux image has been created $ oneimage list

# A Virtual Machine template is registered $ onetemplate list

# You can see the template configuration if further detail $ onetemplate show 0 </xterm>

For reference, the OpenNebula database has been bootstrapped like this (this has been already done, you shouldn't do this again):

<xterm> # REFERENCE ONLY - DON'T DO AGAIN

# create a host $ onehost create one-sandbox –im im_kvm –vm vmm_qemu –net dummy

# create a network $ onevnet create ~/templates/cloud.net

# create a template $ onetemplate create ~/templates/ttylinux-template.one

# create an image $ oneimage create ~/templates/ttylinux-image.one </xterm>

Take a look inside the templates located in ~/templates/ to see what do OpenNebula virtual machine templates look like.

Keep in mind that OpenNebula doesn't strictly need file templates, you can also create resources without a template like this:

<xterm> $ onevm create –name “tty” –memory 128 –cpu 1 –disk ttylinux \ –nic cloud </xterm>

You can read more info on this in the 'man onevm' page and here.

As you may have already noticed all the OpenNebula commands are used in the same way, they all start with one + <resource name> (e.g. onevm, onetemplate, onevnet, onehost, oneacl), and they all share a common structure of subcommands: create, show, list, delete, etc…

You can learn more about each command in the man pages.

The last thing we're going to do is to create a user to launch VMs within Sunstone:

<xterm> $ oneuser create myuser mypassword </xterm>

You can check that a new user has been created by running oneuser list and oneuser show 2. OpenNebula knows how to resolve IDs, so if you feel more comfortable with it, you can refer to a resource by its name: oneuser show myuser.

Sunstone GUI

The first thing we're going to do is to log in as oneadmin to take a look at the superuser Sunstone, which has more options than the Sunstone panel for a regular user.

To login to sunstone open your browser at http://<IP>:9869

:!: Read the specific guide for your Sandbox: VirtualBox, KVM, ESX or AWS to know what IP to use.

The login information is:

This login information can be obtained from ~/.one/one_auth of the oneadmin account.

Take a look at all the resources you can see. You can verify that the resources we created earlier are visible.

Now logout and log in as the user we created earlier (myuser / mypassword). The first thing you might have noticed is that the physical and security resources aren't available anymore, since they can be only managed by the oneadmin user. In particular: Users, Groups, ACLs, Clusters and Hosts.

To start the first Virtual Machine, you simply need to enter into the Virtual Resources → Virtual Machines menu option (we refer to menu options throughout the documentation as TABs) and click on the '+ Create' button. Enter a name: 'tty' and select the ttylinux template.

As a curiosity, you would have been able to instantiate the template from the CLI by doing:

<xterm> $ onetemplate instantiate ttylinux –name tty </xterm>

After clicking the create button, you will be brought back to the Virtual Machines TAB, where you will see the Virtual Machine transition from 'PENDING' (waiting for the scheduler to deploy it), to 'PROLOG' and finally to running.

You may want to click on the VNC icon at the far right of the Virtual Machine row. A new dialog will open with the VNC console in it. Click inside the console to focus it and press the enter key to enter the login screen. The login information is:

Further Exploration

This is just a quick overview to get you started with OpenNebula, but here are many other things you can do:

Troubleshooting

Logs are located in /var/log/one. Be sure to check that in order to troubleshoot. If you need assistance, send us an email to support.