Skip to contentSkip to conversation

Block live migration without pausing VM

DISCUSSION Felix Leimbach 2 participants 2 messages Sep 23, 2012 – Oct 2, 2012 KVM

lore
Share & tools
lore
#0 lore raw

Hi all,

I want to implement live-migration of a highly available VM but I cannot use shared storage.
The -b option to the migrate command already allows for copying the block device (locally stored raw file) and that is exactly what I want. This worked in my experiments but the VM is unreachable (CPU halted?) while the block device is copied, which is unacceptable for my use-case.

Is there a way to copy the block device while the VM is running (copy on read or such)?
The LiveBlockMigration page in the qemu wiki [1] mentions that some of this is already implemented, but I cannot find any of it in the latest qemu-kvm. Any pointers?

Thanks for your suggestions.

[1] http://wiki.qemu.org/Features/LiveBlockMigration

#1 lore raw
Quoted 7 lines · Felix Leimbach

I want to implement live-migration of a highly available VM but I cannot use shared storage.
The -b option to the migrate command already allows for copying the block device (locally stored raw file) and that is exactly what I want. This worked in my experiments but the VM is unreachable (CPU halted?) while the block device is copied, which is unacceptable for my use-case.

Quoted 5 lines

Is there a way to copy the block device while the VM is running (copy on read or such)?
The LiveBlockMigration page in the qemu wiki [1] mentions that some of this is already implemented, but I cannot find any of it in the latest qemu-kvm. Any pointers?

You can live migrate storage - either to move image files to a new file system on the same host or before/after live migration - using the QMP block-stream command. See QEMU's ./qapi-schema.json for documentation on the block streaming commands.

Libvirt exposes this command as "blockpull".

Copying happens in the background while the VM is running. Note that image streaming is orthogonal to guest live migration, you need to do it either before or after (probably onto an NFS export).

Stefan