[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] About VM fork in QEMU
From: |
Xinyang Ge |
Subject: |
Re: [Qemu-devel] About VM fork in QEMU |
Date: |
Sat, 26 Oct 2013 15:12:13 -0400 |
> External snapshots (via the blockdev-snapshot-sync QMP command) can be
> taken in a matter of milliseconds if you only care about disk state.
> Furthermore, if you want to take a snapshot of both memory and disk
> state, such that the clone can be resumed from the same time, you can do
> that with a guest downtime that only lasts as long as the
> blockdev-snapshot-sync, by first doing a migrate to file then doing the
> disk snapshot when the VM pauses at the end of migration. Resuming the
> original guest is fast; resuming from the migration file is a bit
> longer, but it is still the fastest way possible to resume from a
> memory+disk snapshot. If you need anything faster, then yes, you would
> have to write patches to qemu to attempt cloning via fork() that makes
> sure to modify the active disk in use by the fork child so as not to
> interfere with the fork parent.
I noticed there is a "qemu-monitor-command" option for virsh and maybe
I can use this to issue QMP commands. However, when I run
"blockdev-snapshot-sync", I cannot correctly identify the correct
values for argument "device". Below is part of the VM's configuration
file (libvirt format):
<devices>
<emulator>/usr/bin/kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/var/lib/libvirt/images/u12.qcow2'/>
<target dev='hda' bus='ide'/>
<alias name='ide0-0-0'/>
<address type='drive' controller='0' bus='0' unit='0'/>
</disk>
<disk type='block' device='cdrom'>
<driver name='qemu' type='raw'/>
<target dev='hdc' bus='ide'/>
<readonly/>
<alias name='ide0-1-0'/>
<address type='drive' controller='0' bus='1' unit='0'/>
</disk>
Can you help me find out which is the right value for "device" when I
run "blockdev-snapshot-sync"? Thanks in advance!
Xinyang
--
Xinyang GE
Department of Computer Science & Engineering
The Pennsylvania State University
Homepage: http://www.cse.psu.edu/~xxg113/
Re: [Qemu-devel] About VM fork in QEMU, Xinyang Ge, 2013/10/24