Manage VM snapshots in RHEV/oVirt with ManageIQ

Posted by Christian Jung on Wed, Jun 17, 2015
In CloudForms, IT, ManageIQ, RHEV
Tags

One feature which is still missing in ManageIQ or CloudForms is the capability to create, roll back and delete snapshots in RHEV or oVirt.

I wrote three scripts to accomplish these tasks and made them available on Github.

Download the namespace cjung, zip and import it into the appliance by clicking “Automate, Import/Export” and upload the zip file. There is a YAML export of some simple example dialogs which can be used when designing the custom buttons. The custom menu for a VM could look something like this:

custom_buttons

The create snapshot button only asks for the description of the new snapshot. To make the delete and revert snapshot functionality a bit more convenient to use, I wrote a dynamic drop down method. This method queries the list of all available snapshots from RHEV/oVirt and presents the list to the user. By choosing one of the provided options, the snapshot ID is send to the delete_snapshot or revert_snapshot method.

dynamic_dropdown

All three scripts are using the RHEV/oVirt API to manage the snapshots. Actions are executed in the background, so it might take a few seconds until the action is executed.