Received: from eggs.gnu.org ([2001:4830:134:3::10]:35888) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZP6D3-0005U4-6I for qemu-devel@nongnu.org; Tue, 11 Aug 2015 05:51:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZP6Cw-0001WE-ME for qemu-devel@nongnu.org; Tue, 11 Aug 2015 05:51:05 -0400 Received: from indium.canonical.com ([91.189.90.7]:46403) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZP6Cw-0001W6-Gt for qemu-devel@nongnu.org; Tue, 11 Aug 2015 05:50:58 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.76 #1 (Debian)) id 1ZP6Cv-0004jp-U6 for ; Tue, 11 Aug 2015 09:50:57 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id D33382E80C7 for ; Tue, 11 Aug 2015 09:50:57 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Tue, 11 Aug 2015 09:42:22 -0000 From: Kevin Wolf <660366@bugs.launchpad.net> Sender: bounces@canonical.com References: <20101014082807.18846.59606.malonedeb@soybean.canonical.com> Message-Id: <20150811094222.5334.6127.malone@gac.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 660366] Re: "qemu-img convert -O qcow2 -o backing_file" makes huge images Reply-To: Bug 660366 <660366@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a different case. The original report used "qemu-img create" in step 2, which results in a sparse image that refers to the backing file for all data. Your sequence has "qemu-img convert" instead, which fully populates disk.qcow. Therefore, in step 3, "qemu-img convert" leaves the full allocation intact. -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/660366 Title: "qemu-img convert -O qcow2 -o backing_file" makes huge images Status in QEMU: Fix Released Bug description: $ dd if=3D/dev/urandom bs=3D1M of=3D1.img count=3D4 4+0 records in 4+0 records out 4194304 bytes (4,2 MB) copied, 1,0413 s, 4,0 MB/s $ qemu-img create -f qcow2 -b 1.img 2.img Formatting '2.img', fmt=3Dqcow2 size=3D4194304 backing_file=3D'1.img' enc= ryption=3Doff cluster_size=3D0 = $ qemu-img convert -O qcow2 -o backing_file=3D1.img 2.img 3.img $ du -h ?.img 4,1M 1.img 144K 2.img 4,3M 3.img The conversion result is bigger then the source! It appears that "-o backing_file" is not applied to data (as expected). I.e. all data is put into the resulting image: both from source image and "backing" image. Expected behavior is to put only data that is not present in backing_file. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/660366/+subscriptions