I have trouble using snapshots on my ONe cluster with CEPH. Are snapshots supported at all? Here is the list of problems I ran into:
Trying to make snapshot of a non-persistent image finishes successfully, but snapshot is not created, and no error message is logged:
# onevm disk-snapshot-create 727 0 'test snapshot' Thu Jan 5 17:49:56 2017 [Z0][VM][I]: New state is ACTIVE Thu Jan 5 17:49:56 2017 [Z0][VM][I]: New LCM state is DISK_SNAPSHOT Thu Jan 5 17:49:58 2017 [Z0][VMM][I]: Successfully execute transfer manager driver operation: tm_snap_create_live. Thu Jan 5 17:49:58 2017 [Z0][VMM][I]: VM disk snapshot successfully created. Thu Jan 5 17:49:58 2017 [Z0][VM][I]: New LCM state is RUNNING Thu Jan 5 17:49:58 2017 [Z0][LCM][I]: VM disk snapshot operation completed.
I could not figure out how to revert to an older snapshot: I have created a new empty persistent datablock image, attached it to the VM, created a filesystem, put some files on it, created a snapshot, mounted it again, put some more files on it, unmounted, and now I want to figure out how to revert to the previously created snapshot:
- when I open the Storage tab in a given VM, click on the down arrow on the left of the image id, select the snapshot and click on Revert, I get the error “wrong state RUNNING” (the error here is probably that the Revert button should not be active for running VMs at all).
- when I open the Storage tab in a given VM, click on the image name, open the Snapshots tab, select the snapshot and click on Revert, the error is “Cannot revert to snapshot in state USED”.
- when I detach the image from the VM, open the image in Storage->Images, select the snapshot and click on Revert, I get the error “Snapshot is already the active one”.
- when I detach the image from the VM, and try to revert the snapshot under OpenNebula’s hands using “rbd --pool one snap revert one-345@0”, and attach the image to the VM again, the snapshot is correctly rolled back. So the underlying datastore definitely supports rolling back snapshots.
I did not figure out how to create a snapshot of the image which is not curretnly used by a VM, or which is used by a VM in SHUTDOWN or UNDEPLOYED state (on a related topic, I could not figure out how to attach a disk to the VM in these states as well).
I did not figure out how to create a new image out of a snapshot in OpenNebula, even though “rbd copy” and “rbd clone” work as expected. When I open Storage->Images, click on an image, and then on “Clone”, I get the error “Cannot clone images with snapshots”.
To sum it up, for any basic tasks like daily “backup” snapshots or reverting to the known-working state, the snapshots in OpenNebula are not usable. Did I overlook something?
This topic is also related to the following older thread and backlog request: