From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48306) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYWXr-0002YI-In for qemu-devel@nongnu.org; Wed, 24 Feb 2016 05:19:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYWXq-00032p-Lf for qemu-devel@nongnu.org; Wed, 24 Feb 2016 05:19:47 -0500 Date: Wed, 24 Feb 2016 11:19:37 +0100 From: Kevin Wolf Message-ID: <20160224101937.GC4485@noname.redhat.com> References: <951bf8f8c49ff3c2a38dcd02fe78ae00a5de8add.1456274059.git.jcody@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <951bf8f8c49ff3c2a38dcd02fe78ae00a5de8add.1456274059.git.jcody@redhat.com> Subject: Re: [Qemu-devel] [PATCH 3/4] block/vpc: give option to force the current_size field in .bdrv_create List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jeff Cody Cc: pl@kamp.de, qemu-devel@nongnu.org, qemu-block@nongnu.org Am 24.02.2016 um 01:47 hat Jeff Cody geschrieben: > When QEMU creates a VHD image, it goes by the original spec, > calculating the current_size based on the nearest CHS geometry (with an > exception for disks > 127GB). > > Apparently, Azure will only allow images that are sized to the nearest > MB, and the current_size as calculated from CHS cannot guarantee that. > > Allow QEMU to create images similar to how Hyper-V creates images, by > setting current_size to the specified virtual disk size. This > introduces an option, force_size, to be passed to the vpc format during > image creation, e.g.: > > qemu-img convert -f raw -o force_size -O vpc test.img test.vhd > > Bug reference: https://bugs.launchpad.net/qemu/+bug/1490611 > > Signed-off-by: Jeff Cody We need to set a different creator string here that makes vpc_open() recognise the image as current_size based. Kevin