From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55086) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9KOo-0004wQ-Gg for qemu-devel@nongnu.org; Thu, 08 Jan 2015 16:13:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y9KOk-00006T-H5 for qemu-devel@nongnu.org; Thu, 08 Jan 2015 16:13:46 -0500 Received: from mail-we0-x22d.google.com ([2a00:1450:400c:c03::22d]:38415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9KOk-00006N-9d for qemu-devel@nongnu.org; Thu, 08 Jan 2015 16:13:42 -0500 Received: by mail-we0-f173.google.com with SMTP id q58so4704846wes.4 for ; Thu, 08 Jan 2015 13:13:41 -0800 (PST) Sender: Paolo Bonzini Message-ID: <54AEF301.5090306@redhat.com> Date: Thu, 08 Jan 2015 22:13:37 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <54989AB7.7050607@gmail.com> <5498A052.8060904@redhat.com> <20141223121708.GB24588@tesla.redhat.com> <5499B6C1.2060601@gmail.com> <20141224104226.GE24588@tesla.redhat.com> <54AEDE3A.9040404@gmail.com> <54AEF0CF.1060001@redhat.com> In-Reply-To: <54AEF0CF.1060001@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [libvirt-users] Using virsh blockcopy -- what's it supposed to accomplish? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , Gary R Hook , qemu-devel@nongnu.org, libvirt-users@redhat.com -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/01/2015 22:04, Eric Blake wrote: > Where are you specifying the format? I have not personally played > with NBD much. 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). I think you're right. Paolo -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJUrvL9AAoJEL/70l94x66DkusIAJX9/MtI65eOZeW57upOBxuX NOEZA34X8f/JY3WUI6Fhyfeoi/EZet4lEtPDnqG5isrYYhm7TMmJFCLt0fu4pr1Z KSOgMlGN/Ze5m+ty/XdoYn21Ujw/nmSplaMVAc0iqfSXUXnd15LWzICemjXNSnHS zOp0y7uLEM64EygW4vHrPAZZo5JCFj2JbQiRUiWjDyT14JeJ7EWRJ3vYSrZEAclB RVDlm/Q6p9wirFSNbjfZgo1Fn5cHvVvsGvmNvWwLOnijBGeQwOD5LaqSsuAD3ZLN QAQw77eLnVxwES+lR96vQcVWOKfR2pECD9pDEAwTVTqn/xbw0dqWuEwMSIZbfXU= =Asfg -----END PGP SIGNATURE-----