[libvirt] [RFC] Introduce virDomainBlockCopy API

Jiri Denemark jdenemar at redhat.com
Tue Jun 21 13:51:23 UTC 2011


On Tue, Jun 21, 2011 at 07:36:23 -0600, Eric Blake wrote:
> On 06/21/2011 07:14 AM, Stefan Hajnoczi wrote:
> >> This new virDomainBlockCopy API is different. It can be used when you have a
> >> disk image (no matter what kind) stored somewhere and you need to copy it
> >> somewhere else. It takes two different and independent images, one currently
> >> assigned to a virtual block device and a new unassigned one, copies all data
> >> from the old one to the new one and reconfigures the block device to use the
> >> new image. Neither of the image formats has to be even capable of backing
> >> images.
> > 
> > Right.
> 
> This sounds related to my thread on snapshot capabilities, where if the
> disk is not in a format where qemu can do a live snapshot, then libvirt
> needs a command to pause guest I/O, libvirt snapshots the disk, then
> libvirt informs qemu that the block device has a new image.

It's all connected in some way, which is also why qemu will probably utilize
common code to provide these functions. However, since BlockCopy is not a
snapshot, it's about copying all data from one image to another qemu can do it
all internally with a single monitor command to minimize the impact on running
guest.

Jirka




More information about the libvir-list mailing list