There's a new feature called block migration available with the recently released qemu-kvm-0.12 version. Patches for this feature was first introduced back in November 2009 by ibm and allows you to do block migration during live migration. It works by copying block images to a destination asynchronously. It does this by copying the whole disk first then copying dirty blocks accumulated during the migration similarly to ram migration.

If you're running qemu-kvm-0.12 you can access this feature from the qemu monitor. There are actually two modes of migrating block storage.
The commands for performing these operations are as follows. For complete storage copy, use the -b flag on the source when migrating your virtual machine as shown below.
(qemu) migrate -d -b tcp:1.2.3.4:4444
For incremental storage copy where you're using a backing file use the -i flag on the source as follows. Your backing file should obviously be in the same location on both source and destination servers.
(qemu) migrate -d -i tcp:1.2.3.4:4444
If you're in a situation where shared storage is not currently available for cost or other reasons and really would like to perform live migration, this is your best solution. Bear in mind however that your guest will be suspended during the end phase of block migration so you can expect a little downtime. I haven't personally tested this yet so give this a test run and feel free to post comments or questions.
Comments
Post new comment