qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] [libvirt] vm live storage migration with snapshots


From: Eric Blake
Subject: Re: [Qemu-discuss] [libvirt] vm live storage migration with snapshots
Date: Wed, 11 Feb 2015 14:12:52 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 02/11/2015 02:07 PM, Edward Young wrote:
>>> What if this vm has a number of disk-only external snapshots? In the
>>> current version, how can live migrate this vm?
>>
>> Are the snapshots based on shared storage, or local-only storage?
>>
> 
> Yes, I'm talking about the local-only storage.

Okay, glad I guessed as much, then.

> 
> Yes, I agree with you. In this case, we need to migrate the entire disk
> state. In this case, there is no snapshot involved. we just perform the
> regular migration with 'virsh migrate....'. Is this correct?

Using 'virsh migrate --copy-storage-all' would indeed migrate the entire
disk, if you can't supply shared storage.

>>> Or is it possible to iteratively transfer all the snapshots to the
>>> destination and later live migrate only the latest new data?
>>>
>>
>> Yes, that works too, and is probably faster, especially if you have
>> out-of-band means for sharing read-only state between source and
>> destination.
>>
> 
> My question is here. If we do not have any shared storage resource between
> source and destination (eg. long distance VM migration), how can we migrate
> the latest new data to the destination? we can copy the base, mid to
> destination manually, then how can we migrate the active snapshot( new data
> goes in)? I learned that drive_mirror in qemu is built to finish this, but
> do not understand clearly. Could you elaborate for me, or provide an
> example?

Use 'virsh migrate --copy-storage-inc' to migrate only the incremental
changes, which assumes that the destination can already see the same
read-only backing data that the source sees.  In fact, modern
libvirt/qemu does this for you by setting up an NBD server on the
destination, doing a data mirror from the source into the destination
(so that you DO have shared storage, at least for the duration of the
migration), then doing the live migration, then tearing down the NBD
mirroring link.

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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]