[libvirt-users] Using virsh blockcopy -- what's it supposed to accomplish?
Gary R Hook
grhookatwork at gmail.com
Fri Jan 9 00:18:44 UTC 2015
On 1/8/15 3:04 PM, Eric Blake wrote:
>
> Where are you specifying the format? I have not personally played with
> NBD much.
This appears to be the pervasive situation. There's not much out there
in google-land about this.
> But here's my guess: Even though /tmp/dsk.test.qcow2 is a
> qcow2 file, the NBD server is serving up a RAW image through /dev/nbd2.
> Thus, if you are trying to treat /dev/nbd2 as the destination of your
> copy, you MUST tell qemu that the file format of the copy is to be raw
> (regardless of the file format of the original that is being copied
> from). If you omit the --raw (also spelled --format=raw in newer
> libvirt) parameter to the virsh blockcopy command, then libvirt has to
> guess at the destination format; if the source was qcow2, then libvirt
> will guess that the destination should be qcow2 as well. But writing
> qcow2 data to a raw NBD disk means you have created a nested file in
> /tmp/dsk.test.qcow2 - it is a qcow2 file whose contents are a qcow2 file
> whose contents are the raw data (not typical usage, and a bit weird to
> wrap your head around).
Yes, I _finally_ figured all of that out this afternoon after observing
that --raw seemed to get everything working. Thank you for confirming
the conclusions I arrived at independently.
I should turn this experience into a guest blog post, I suppose.
--
Gary R Hook
Senior Kernel Engineer
NIMBOXX, Inc
More information about the libvirt-users
mailing list