Backlog #3187

Persistent VM snapshots

Added by Tino Vázquez almost 7 years ago. Updated about 5 years ago.

Status:NewStart date:09/12/2014
Priority:HighDue date:
Assignee:-% Done:

0%

Category:Drivers - VM
Target version:-

Description

After a poweroff/poweron and migrate cycle, snapshots are discarded by OpenNebula. With new versions of libvirt, this is no longer needed


Related issues

Related to Bug #3740: VM snapshots not visible after powercycle (poweroff / res... Closed 04/08/2015
Related to Backlog #3085: snapshots, persistent across reboots, migrations, and shu... Closed 07/22/2014

Associated revisions

Revision 0003725b
Added by Carlos Martín over 6 years ago

Feature #3187: Do not clear VM snapshot list

Revision 61f7fe16
Added by Ruben S. Montero over 6 years ago

Revert "Feature #3187: Do not clear VM snapshot list"

This reverts commit 0003725b07f501f7d093a59185f5ce6e3819eccf.

History

#1 Updated by Ruben S. Montero almost 7 years ago

  • Target version changed from 67 to Release 4.10

#2 Updated by Ruben S. Montero almost 7 years ago

  • Assignee set to Ruben S. Montero

#3 Updated by Carlos Martín over 6 years ago

  • Assignee changed from Ruben S. Montero to Carlos Martín

#4 Updated by Ruben S. Montero over 6 years ago

  • Tracker changed from Feature to Backlog
  • Target version deleted (Release 4.10)

It seems that currently is not properly supported, moving it to backlog....

#5 Updated by Ruben S. Montero over 6 years ago

  • Status changed from New to Pending

#6 Updated by Carlo Daffara over 6 years ago

We are currently looking into this for kvm+libvirt, in a fairly recent fashion (kvm 1.5.3 and libvirt 1.2.8). Can you provide some indication of what is not properly supported? Maybe the cleanup, since the images may remain after the machine lifecycle?

#7 Updated by Ruben S. Montero over 6 years ago

  • Tracker changed from Backlog to Feature
  • Category changed from Core & System to Drivers - VM
  • Status changed from Pending to New
  • Assignee deleted (Carlos Martín)
  • Target version set to Release 4.14

Carlo Daffara wrote:

We are currently looking into this for kvm+libvirt, in a fairly recent fashion (kvm 1.5.3 and libvirt 1.2.8). Can you provide some indication of what is not properly supported? Maybe the cleanup, since the images may remain after the machine lifecycle?

Probably is just a matter of re-testing it. The changes in oned are fairly simple and they are actually done...

Moving this to 4.14 to test if we can preserve snapshots across migrations.

Thanks

#8 Updated by Stefan Kooman about 6 years ago

According to this post on libvirt-users mailing list there is a workaround possible: https://www.redhat.com/archives/libvirt-users/2013-March/msg00117.html.

#9 Updated by Carlos Martín about 6 years ago

  • Related to Bug #3740: VM snapshots not visible after powercycle (poweroff / resume) added

#10 Updated by Carlos Martín about 6 years ago

  • Related to Backlog #3085: snapshots, persistent across reboots, migrations, and shutdowns added

#11 Updated by Jaime Melis about 6 years ago

There might be a shortcut for the procedure explained in the message referece by Stefan.

Every time that a new snapshot is created, dump the snapshot to a file. Upon resume, redefine all snapshots.

Proof-of-concept:

$ virsh snapshot-list one-$VMID
# => returns $SNAPSHOT_ID

$ virsh snapshot-dumpxml one-$VMID $SNAPSHOT_ID > snap-$SNAPSHOT_ID.xml
$ onevm poweroff $VMID
$ onevm resume $VMID

$ virsh snapshot-list one-$VMID
# => this is emty for the moment

$ sed -i s/...../ -$SNAPSHOT_ID
# => to replace the uuid with the new uuid

$ virsh snapshot-create one-$VMID snap-$SNAPSHOT_ID.xml --redefine
$ virsh snapshot-list one-$VMID
# => this returns the snapshot, and you can revert back to it

TODO: define snapshot-current?

#12 Updated by Ruben S. Montero almost 6 years ago

  • Tracker changed from Feature to Backlog
  • Target version changed from Release 4.14 to Release 5.0

#13 Updated by Ruben S. Montero over 5 years ago

  • Priority changed from Normal to High

#14 Updated by Ruben S. Montero over 5 years ago

  • Target version deleted (Release 5.0)

#15 Updated by Peter Loeffler over 5 years ago

We would also need this feature badly.
We are a 600 people yellow pages company in austria and need to migrate from vmware to a kvm based technology.
OpenNebula is our number 1 but this limitation is nearly a show-stopper for us.

#16 Updated by Stefan Kooman over 5 years ago

@Peter Loeffler Do you need VM snapshots (incl. memory / state of the VM) or is DISK snapshot functionality enough? DISK snapshots will survive (live-) migrations.

#17 Updated by Peter Loeffler over 5 years ago

We would need VM snapshot too.
We also tried a little hack in the snapshot_create and snapshot_revert shell scripts to be able to do rbd snapshots (without memory in this case).
It checks if there are any rbd-disks attached to the vm and if so, it suspends the domain, do a rbd snapshot of all disks and then resumes the domain.
Basicly it seems to work and we want to share the code as soon as we are ready with it.
The problem here is also that the snapshot in sunstone is gone after any power cycle but the rbd snapshots are left over.

#18 Updated by Ron Blom over 5 years ago

We also like to see this feature very much. I was also thinking about hacking the snapshot create and delete scripts but don't know how to fix the snapshot disappearing in sunstone.

#19 Updated by Ruben S. Montero about 5 years ago

There is new option to KEEP_SNAPSHOTS after a power on/off cycle, it can be set to yes, but support from libvirt/qemu is still missing (i.e. recovering snapshots from the qcow2 file)

Also available in: Atom PDF