[libvirt-users] Migrate VM's to different storage pool?

Eric Blake eblake at redhat.com
Tue Feb 12 15:12:03 UTC 2013


On 02/12/2013 06:22 AM, Jamie Fargen wrote:
> Eric-

[Please don't top-post on technical lists]

> 
> Why wouldn't a 'virsh blockcopy --pivot domain src dest' be sufficient to
> migrate the volumes to a new storage pool?

It IS sufficient, as part of the sequence I documented here:

>>
>> # save off the persistent definition for later
>> virsh dumpxml --inactive $dom > $dom.xml
>> # make the guest transient
>> virsh undefine $dom
>> # remind myself which disks need migration
>> virsh domblklist $dom
>> # for each disk (such as "vda"), do a migration
>> virsh blockcopy $dom $disk /path/to/new --wait --verbose --pivot
>> # make the guest persistent again
>> virsh define $dom.xml

Or maybe I'm misunderstanding your question.  Are you asking why
blockcopy doesn't work with a persistent domain?  And the answer to that
is because as of at least qemu 1.4, there is no support for remembering
the progress of a block copy across a domain restart; there have been
patches proposed for qemu 1.5 that add a persistent bitmap, and there
are plans to teach libvirt to use this new feature to allow 'virsh
blockcopy' even for a persistent domain, so that you don't have to
juggle through the steps of going to a transient domain just to do the
blockcopy.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20130212/323ee171/attachment.sig>


More information about the libvirt-users mailing list