Yitao Jiang
2015-Jan-27 10:10 UTC
[libvirt-users] virsh snapshot-create persistent through destroy(undefine)
Hi, If i take a snapshot of a qcow2 image backed domain via virsh snapshot-create domainID and I shutdown the machine (and probably destroy the domain if virsh list still shows it running), and then undeinfed the domain will that snapshot still exist and be active when I define and start the domain back up? --- Thanks, Yitao(依涛 姜) jiangyt.github.io
Yitao Jiang
2015-Jan-27 10:17 UTC
Re: [libvirt-users] virsh snapshot-create persistent through destroy(undefine)
Sorry , here is my environments [root@localhost snapshot]# qemu-img | grep version qemu-img version 0.12.1, Copyright (c) 2004-2008 Fabrice Bellard for qemu-img to create a sparse image during conversion [root@localhost snapshot]# libvirtd --version libvirtd (libvirt) 0.10.2 --- Thanks, Yitao(依涛 姜) jiangyt.github.io On Tue, Jan 27, 2015 at 6:10 PM, Yitao Jiang <willierjyt@gmail.com> wrote:> Hi, > > If i take a snapshot of a qcow2 image backed domain via virsh > snapshot-create domainID and I shutdown the machine (and probably destroy > the domain if virsh list still shows it running), and then undeinfed the > domain will that snapshot still exist and be active when I define and > start the domain back up? > > --- > Thanks, > Yitao(依涛 姜) > jiangyt.github.io >
Eric Blake
2015-Jan-27 17:51 UTC
Re: [libvirt-users] virsh snapshot-create persistent through destroy(undefine)
On 01/27/2015 03:10 AM, Yitao Jiang wrote:> Hi, > > If i take a snapshot of a qcow2 image backed domain via virsh > snapshot-create domainID and I shutdown the machine (and probably destroy > the domain if virsh list still shows it running), and then undeinfed the > domain will that snapshot still exist and be active when I define and > start the domain back up?Shutdown/destroy does not lose track of snapshot information. Undefine does; but it only loses track of the metadata; the snapshot data still exists, and you could re-create it with virsh snapshot-create --redefine after the domain is redefined, if you want to still revert to that state. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Yitao Jiang
2015-Jan-30 22:01 UTC
Re: [libvirt-users] virsh snapshot-create persistent through destroy(undefine)
Hi,Eric Thank you very much for the information On Jan 28, 2015 1:51 AM, "Eric Blake" <eblake@redhat.com> wrote:> On 01/27/2015 03:10 AM, Yitao Jiang wrote: > > Hi, > > > > If i take a snapshot of a qcow2 image backed domain via virsh > > snapshot-create domainID and I shutdown the machine (and probably destroy > > the domain if virsh list still shows it running), and then undeinfed the > > domain will that snapshot still exist and be active when I define and > > start the domain back up? > > Shutdown/destroy does not lose track of snapshot information. Undefine > does; but it only loses track of the metadata; the snapshot data still > exists, and you could re-create it with virsh snapshot-create --redefine > after the domain is redefined, if you want to still revert to that state. > > -- > Eric Blake eblake redhat com +1-919-301-3266 > Libvirt virtualization library http://libvirt.org > >