qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [libvirt-users] Using virsh blockcopy -- what's it supp


From: Gary R Hook
Subject: Re: [Qemu-devel] [libvirt-users] Using virsh blockcopy -- what's it supposed to accomplish?
Date: Thu, 08 Jan 2015 18:18:44 -0600
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]