[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

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

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

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
participants (2)
-
Eric Blake
-
Yitao Jiang