:!: This is the old Community Wiki page. Please go to the new Community Wiki.

One of the most difficult aspects of effectively utilizing any Cloud computing infrastructure is the need to adequately understand the life-cycle that a Cloud-managed virtual machine will progress through. It is the desire of this documentation to provide both developers and Cloud consumers with a more thorough understanding of life-cycle management than is available in existing literature.

We will cover both the life-cycle of virtual machines using OpenNebula's XML-RPC interface, and the life-cycle of virtual machines managed using OpenNebula's OCCI interface.

OpenNebula Life-Cycle

We will cover the virtual machine life-cycle using OpenNebula's XML-RPC interface. Several aspects of defining a virtual machines, and progressing through the life-cycle using OpenNebula's XML-RPC interface will be kept brief, simply because there is existing literature covering each aspect in greater detail.

Image Registration

Please see Image Guide for more in-depth review.

First, we start with the concept of image registration in an OpenNebula managed cloud environment. Prior to the instantiation of any virtual machines, an image must exist in the image repository. There images can exist in two states, either persistent or non-persistent. We proceed under the assumption that users are working with non-persistent images, in which an image in the repository is cloned for each new virtual machine, rather than each image being used by one and only one virtual machine.

To begin, let's define a disk image template, <image-template>:

NAME = "Debian Squeeze i386"
PATH = ~/debian-squeeze-i386.qcow2
PUBLIC = NO
PERSISTENT = NO
TYPE = OS
DESCRIPTION = "Initial Debian Squeeze installation."

As part of our image template file, we assume the disk image is located at ~/debian-squeeze-i386.qcow2, which would be the 'oneadmin's' user folder. Next, we call OpenNebula's image Command Line (CLI) tool to create, and subsequently upload, our disk image to the image repository.

<xterm> oneadmin@opennebula-server:~$ oneimage create <image-template> </xterm>

Our disk image has been uploaded to OpenNebula's image repository, and in turn, we've received XML describing the properties of the disk image, including the image's ID.

Next, let's list all images we've uploaded into the repository simply to confirm that OpenNebula contains our image.

<xterm> oneadmin@opennebula-server:~$ oneimage list </xterm>

As can be seen, our disk image now exists within the repository. Using the disk image ID, we can create virtual machines which will boot into a clone version of the disk image.

Virtual Network Creation

Please see Virtual Network Guide for more in-depth review.

Open Cloud Computing Interface (OCCI) Life-Cycle

Now we will cover the virtual machine life-cycle using Open Grid Forum's Open Cloud Computing Interface API.

Image Registration

Please see Image Guide for more in-depth review.

Virtual Network Creation

Please see Virtual Network Guide for more in-depth review.