[libvirt-users] non failover equivalent to "virsh migrate --copy-storage-all"

Eric Blake eblake at redhat.com
Wed Apr 29 16:42:08 UTC 2015


On 04/29/2015 10:30 AM, Eric Blake wrote:

>> Is there a way to just copy the data file over to the second server,
>> without moving the VM?
>> I want the equivalent of doing these two migrations is sequence, but
>> without moving the VM.
> 
> Yes - 'virsh blockcopy' can be used for creating a live copy of storage
> without wasting time copying memory state.  That said, blockcopy is
> still waiting for a qemu 2.4 feature of persistent bitmaps before it can
> work with non-transient domains (that is, in order to make the copy
> operation restartable, which is necessary for a persistent domain, we
> need more help from qemu, as well as patches to libvirt to use that new
> qemu feature).  So for now, you will have to temporarily undefine your
> domain before doing the blockcopy; you may also have to manually
> coordinate quiescing the disks through the guest agent if you want your
> backup to be bootable from a stable point in guest I/O (the copy you are
> creating via migration is equivalent to what you get when you yank the
> power cord; the disk may have unflushed pending I/O that you lose,
> unless you involve the guest agent to quiesce data operations).

Another potential solution, with qemu 2.3 and new enough libvirt, is to
create an external libvirt snapshot, use external means to copy the
primary file while it is read-only, then use active blockcommit to merge
the changes made in the meantime back into the primary file.  This works
without making the domain transient, but also needs manual work for
guest-agent queiscing of the file system if you want the backup copy to
be at a safe point in guest execution.  It is a frequent topic on this
list, so there are plenty of archived messages saying the sequence of
steps to accomplish this.

-- 
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: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20150429/404e2871/attachment.sig>


More information about the libvirt-users mailing list