
On 12/23/14 6:17 AM, Kashyap Chamarthy wrote:
On Mon, Dec 22, 2014 at 03:50:58PM -0700, Eric Blake wrote:
On 12/22/2014 03:27 PM, Gary R Hook wrote:
I am experimenting with the blockcopy command, and after figuring out how to integrate qemu-nbd, nbd-client and dumpxml/undefine/blockcopy/define/et. al. I have one remaining question:
What's the point?
Among other uses, live storage migration.
Let's say you are running on a cluster, where your VM is running locally but was booted from network-accessed storage. You don't want any guest downtime, but you want to have the faster performance made possible by accessing local storage instead of the network-accessed storage. virsh blockcopy can be used to change qemu's notion of where the active layer of the disk lives without any guest time, by copying then pivoting to a local file.
To add to Eric's explanation, I recently wrote a small example about it here (this was tested with libvirt 1.2.6 & QEMU 2.1):
http://kashyapc.com/2014/07/06/live-disk-migration-with-libvirt-blockcopy/
I read that article. Now shut down the domain (post-pivot) which is using the new disk file, and start it up, without using a block device. This is the part that no one seems to write about, nor do I see that in your example. But thank you very much for your help and your articles; very much appreciated. -- Gary R Hook Senior Kernel Engineer NIMBOXX, Inc