In this tutorial we will see how to perform OpenNebula VM administration using Sunstone GUI. There are many ways we can make sure that the data in the VM is intact while migrating from one host to another or duplicating the VM’s.
Image Cloning
Cloning a VM image means making an exact replica of the disk image used by a VM.
Goto the “Images” option under the “Virtual Resources” tab of Sunstone GUI. Then select the image you want to clone and then click the “Clone” option as shown in the screenshot below.
This will pop up a menu to input the name of the new image as shown below.
Enter the name and then click the Clone button to get the image cloned. Once done, you can see the new cloned image in the Image list.
You can now use the new cloned image to deploy VM’s.
Template Cloning
Template cloning is the process of duplicating the currently available templates in OpenNebula.
Goto “Templates” option under the “Virtual Resources” tab of Sunstone. Select the desired Template whose clone should be taken and click “Clone” option as shown in the screenshot below
This will pop up another window that asks for the Cloned Image name, Enter a desired name and then click the Clone button. Once done, you can see the cloned template in the template list.
VM Cloning
Cloning a VM means to copy the disk of the VM in the current state. Then that cloned image can be used to deploy another VM having same contents.
There are two ways we can take the backup of the disk that a VM is using.
Deferred Backup
In deferred method, the data is written into the disk backup only after terminating the VM which is using it. So in general, if we take a deferred backup of a VM, that VM is destroyed. Then using that disk image, we can deploy new VM’s.
To take the snapshot of a disk in Deferred mode, follow the steps mentioned below.
Goto the “Virtual Machines” option under the “Virtual Resources” tab in the Sunstone GUI. This will list the available VM’s. Select the VM whose backup needs to be taken and click the “Storage” tab as shown in the screenshot below.
Then select the “Snapshot” option, which will open up a pop up as shown in the screenshot below.
Enter the desired name of the Image, then select “Deferred” as the Snapshot Type and click “Take Snapshot” button.
Once done, goto the “Virtual Machines” option under the “Virtual Resources” tab in the Sunstone GUI homepage. Then poweroff the VM. Once the VM is powered off the backup snapshot Image gets its state as Ready. Once the image status is ready, you can use it to deploy new VM’s.
You can list the backed up snapshot in the images list of Sunstone.
Hot Backup
In Hot mode of backup, the data of the VM is copied even when the VM state is running. This is an on the go backup method. Here there is no need to terminate the VM to take its data backup.
To take the snapshot of a disk in Hot mode, follow the steps mentioned below.
Goto the “Virtual Machines” option under the “Virtual Resources” tab in the Sunstone GUI. This will list the available VM’s. Select the VM whose backup needs to be taken and click the “Storage” tab as shown in the screenshot below.
Then select the “Snapshot” option, which will open up a pop up as shown in the screenshot below.
Enter the desired name of the Image, then select “Hot” as the Snapshot Type and click “Take Snapshot” button.
Once done, the image status gets ready in a few minutes depending on the size of the disk. You can list the backed up snapshot in the images list of Sunstone.
As compared to deferred method, hot method doesn’t want the VM to be destroyed for the image to be in ready state.
UPDATE TEMPLATE
Updating a template means to change the properties or values of a template that is already created.
To do this Select the template whose properties needs to be edited. Then click the “Update” Button as shown in the screenshot.
You will get a pop up window as shown in the screenshot below.
Then change/modify the options to the desired ones and click the “Update” button for the changes to take effect. Once done you can use the template to create new VM’s with properties defined in the updated template.
Recommended Readings
OpenNebula IaaS Cloud Installation on Ubuntu – Part 1
OpenNebula on Ubuntu – Part 2 – VM Creation and Management
OpenNebula on Ubuntu – Part 3 – Windows VM Creation