[libvirt] kvm, sync guest disk before saving ?

Daniel P. Berrange berrange at redhat.com
Fri Jan 30 10:33:57 UTC 2009


On Fri, Jan 30, 2009 at 12:44:14AM +0100, Daniel Schwager wrote:
> Hi,
> 
> is there a way to get a consistent disk image of a domain running qemu-kvm
> before saving it ? 
>
> I used " xm sysrq <id> s" with xen-hypervisor - but what's the way with kvm ?
> Or could I install drivers into the guest helping to solve this problem ?

'xm sysrq s' is not giving you a consistent disk image, because between
the time you issue that command, and the time you save the disk/vm more
I/O could have been issued.

Ultimately if you want consistent disk images, you either need to stop
the VM, and clne the disk. Or save the VM state to a file, and then
clone the disk. Or use a 'vm snapshot' capability which does those
two operations in one (which potentially allows for live snapshotting,
which a 2-step process would not). We don't yet support the latter,
but you can do  save/restore of the VM state to a file, and snapshot
the disk at that time.

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the libvir-list mailing list