From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40237) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCOwa-0001kJ-6D for qemu-devel@nongnu.org; Wed, 30 Jul 2014 04:09:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XCOwZ-0001Ce-0r for qemu-devel@nongnu.org; Wed, 30 Jul 2014 04:09:04 -0400 Received: from mail-ob0-x22b.google.com ([2607:f8b0:4003:c01::22b]:61622) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XCOwY-0001CU-T2 for qemu-devel@nongnu.org; Wed, 30 Jul 2014 04:09:02 -0400 Received: by mail-ob0-f171.google.com with SMTP id wm4so301054obc.16 for ; Wed, 30 Jul 2014 01:09:01 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1404744867-32469-1-git-send-email-milos.vyletel@gmail.com> <20140729133745.GB25860@stefanha-thinkpad.redhat.com> Date: Wed, 30 Jul 2014 09:09:01 +0100 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH] vmdk: improve streamOptimized vmdk support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Milos Vyletel Cc: Kevin Wolf , Fam Zheng , qemu-devel , Stefan Hajnoczi On Tue, Jul 29, 2014 at 3:49 PM, Milos Vyletel wrote: > On Tue, Jul 29, 2014 at 10:37 AM, Stefan Hajnoczi wrote: >> On Tue, Jul 29, 2014 at 2:46 PM, Milos Vyletel wrote: >>> On Tue, Jul 29, 2014 at 9:37 AM, Stefan Hajnoczi wrote: >>>> On Mon, Jul 07, 2014 at 10:54:27AM -0400, Milos Vyletel wrote: >>>>> VMDK's streamOptimized format is different that regular sparse format. >>>>> L1(GD) and L2(GT) tables are not predefined but rather generated and >>>>> written during image creation mainly because there is no way to tell >>>>> how much space data will occupy once they are compressed. Also the >>>>> location of header, L1 and L2 tables differs. >>>>> >>>>> - L2 tables (grain tables) are written after all grains they point to >>>>> - L1 tables are written after all grains and L2 tables >>>>> - footer at the end is used instead of header in first sector >>>>> >>>>> This patch improves streamOptimized support and adds possibility to >>>>> create true streamOptimized images using qemu-img. Some of the changes >>>>> are from VMDK specs, some of them from hexdump-ing images from VMWare >>>>> and VirtualBox. >>>>> >>>>> I have compared these images to the ones generated by VMWare and vbox >>>>> and they are identical with the exception of DescriptorFile that has >>>>> some differences but none that would change behavior(CID and some >>>>> additional DDB entries differ) and streamOptimized image generated from >>>>> raw image was succesfully imported (as OVA) into VMWare ESXi and Oracle >>>>> OVM. >>>>> >>>>> Signed-off-by: Milos Vyletel >>>>> --- >>>>> block/vmdk.c | 363 +++++++++++++++++++++++++++++++++++++++++++++------------- >>>>> 1 files changed, 281 insertions(+), 82 deletions(-) >>>> >>>> What does this patch do beyond what QEMU already supports today? >>>> >>>> Is there a particular application that rejected QEMU's streamOptimized >>>> images? Is this a bug fix? >>>> >>>> Please use scripts/checkpatch.pl to check coding style. >>>> >>>> Fam: Please review >>>> >>> >>> Images created/converted using QEMU were rejected by VMWare ESXi, >>> vCloud, VirtualBox and Oracle OVM. I did not try anything else. >>> >>> Generally speaking streamOptimized format is not followed by QEMU. >>> Instead regular VMDK format + encryption is used. We can say this is >>> bug fix since streamOptimzed format is already included but does not >>> work well. >>> >>> I'll check the style and fix the code. I'll postpone resubmit until >>> further review is done since I'm sure there will be things that will >>> need to be fixed. >> >> What was the command-line you used? >> >> qemu-img convert -f qcow2 -O vmdk -o subformat=streamOptimized >> input.qcow2 output.vmdk >> >> Stefan > > I've been using test image from > http://wiki.qemu.org/download/linux-0.2.img.bz2 and converting it like > this: > > qemu-img convert -O vmdk -o > adapter_type=lsilogic,compat6,subformat=streamOptimized linux-0.2.img > linux-0.2.vmdk Okay, great. I wanted to check that you used subformat=streamOptimized. If possible, please be more specific in the commit description about what caused ESXi and other software to reject the image and what exactly this patch changes. Stefan