Gionatan Danti
2018-Mar-14 08:36 UTC
[libvirt-users] qemu-img snapshot on running virtual machine
Hi all, I have a question about internal qcow2 snapshots of a live/running virtual machine taken via "qemu-img snapshot command". My question is: is it safe to execute the command above against a running machine? Or it will cause corruption? Naively I think it should *not* be safe, however, I would like a direct confirmation. Thanks. -- Danti Gionatan Supporto Tecnico Assyoma S.r.l. - www.assyoma.it email: g.danti@assyoma.it - info@assyoma.it GPG public key ID: FF5F32A8
Ján Tomko
2018-Mar-15 08:13 UTC
Re: [libvirt-users] qemu-img snapshot on running virtual machine
On Wed, Mar 14, 2018 at 09:36:52AM +0100, Gionatan Danti wrote:>Hi all, >I have a question about internal qcow2 snapshots of a live/running >virtual machine taken via "qemu-img snapshot command". > >My question is: is it safe to execute the command above against a >running machine? Or it will cause corruption? Naively I think it should >*not* be safe, however, I would like a direct confirmation. >It is not safe. For a running domain, you need to go through libvirt and also save the memory of the VM - doing just the disk snapshot for a running machine would be an equivalent of copying a physical hard drive after pulling out the power cord. Jan
Gionatan Danti
2018-Mar-15 13:55 UTC
Re: [libvirt-users] qemu-img snapshot on running virtual machine
Il 15-03-2018 09:13 Ján Tomko ha scritto:> It is not safe. > > For a running domain, you need to go through libvirt and also save the > memory of the VM - doing just the disk snapshot for a running machine > would be an equivalent of copying a physical hard drive after pulling > out the power cord. > > JanHi Jan, I 100% agree that taking a snapshot without dumping the memory content would be akin to "pulling the plug" on the guest. However, I was speaking about disk image file consistency. In other words: does taking a snapshot of an in-use virtual disk have a chance to corrupt the *original* disk Qcow2 image file? Thanks. -- Danti Gionatan Supporto Tecnico Assyoma S.r.l. - www.assyoma.it email: g.danti@assyoma.it - info@assyoma.it GPG public key ID: FF5F32A8