Received: from [140.186.70.92] (port=56569 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P6KEF-0004Sa-F8 for qemu-devel@nongnu.org; Thu, 14 Oct 2010 05:36:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P6KEE-0003xc-C7 for qemu-devel@nongnu.org; Thu, 14 Oct 2010 05:36:03 -0400 Received: from adelie.canonical.com ([91.189.90.139]:46476) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P6KEE-0003x8-5h for qemu-devel@nongnu.org; Thu, 14 Oct 2010 05:36:02 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1P6KEA-0002Vx-TV for ; Thu, 14 Oct 2010 10:35:59 +0100 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id C30292E80BB for ; Thu, 14 Oct 2010 09:35:40 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Thu, 14 Oct 2010 09:25:46 -0000 From: Stefan Hajnoczi <660366@bugs.launchpad.net> Sender: bounces@canonical.com References: <20101014082807.18846.59606.malonedeb@soybean.canonical.com> Message-Id: <20101014092547.24795.18498.malone@wampee.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: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org It is possible to chain backing files. As a workaround you could do the following: $ qemu-img create -f qcow2 -b 2.img 4.img # from now on don't modify 2.img,= instead use 4.img $ qemu-img create -f qcow2 -b 2.img 3.img # here is the 3.img you tried to = create with qemu-convert Images 1.img and 2.img should never be modified, they are immutable snapshots. Images 3.img and 4.img can be modified and will contain only changes against 2.img. Perhaps qemu-img needs a command to drop data that is duplicated in the base image. This could be a new flag to commit: qemu-img commit --dedup 3.img. -- = "qemu-img convert -O qcow2 -o backing_file" makes huge images https://bugs.launchpad.net/bugs/660366 You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. Status in QEMU: New 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' encry= ption=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 "bac= king" image. Expected behavior is to put only data that is not present in backing_file.