Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NLfCZ-0007DU-PJ for qemu-devel@nongnu.org; Fri, 18 Dec 2009 10:57:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NLfCV-00077d-0H for qemu-devel@nongnu.org; Fri, 18 Dec 2009 10:57:11 -0500 Received: from [199.232.76.173] (port=56419 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLfCU-00077E-N6 for qemu-devel@nongnu.org; Fri, 18 Dec 2009 10:57:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59473) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NLfCU-0000vS-8n for qemu-devel@nongnu.org; Fri, 18 Dec 2009 10:57:06 -0500 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nBIFv4V7027662 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 18 Dec 2009 10:57:04 -0500 Received: from localhost (vpn2-10-80.ams2.redhat.com [10.36.10.80]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nBIFuwZT030585 for ; Fri, 18 Dec 2009 10:57:02 -0500 Date: Fri, 18 Dec 2009 15:56:55 +0000 From: "Richard W.M. Jones" Message-ID: <20091218155655.GA28076@amd.home.annexia.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH 0/2] Small improvements to VMDK4 file handling List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org We're tracing a bug in "qemu-img convert" where it will silently fail to convert certain types of VMDK file. The VMDK files produced by VMWare vSphere / ESX 4.0, which have the VMDK subformat "streamOptimized" are one notable case: https://bugzilla.redhat.com/show_bug.cgi?id=548723 These two patches certainly don't fix this, but they do at least prevent "qemu-img convert" from silently failing. Unfortunately to do this I had to look much more deeply into the VMDK format than the current VMDK block driver does. We have to parse the VMDK4 plain text descriptor which is embedded in these binary files. So the first patch adds the parsing and has the benefit of improving how the CID and parentCID fields are read and updated. The second patch parses the createType field from the descriptor, and refuses to continue if it's not on a short whitelist of subformats which we are likely to be able to parse. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top