From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44350) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V93Ih-0005Gk-Qw for qemu-devel@nongnu.org; Mon, 12 Aug 2013 21:21:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V93Ib-0008MD-VT for qemu-devel@nongnu.org; Mon, 12 Aug 2013 21:21:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9888) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V93Ib-0008M2-Iw for qemu-devel@nongnu.org; Mon, 12 Aug 2013 21:21:25 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r7D1LPoc023847 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 12 Aug 2013 21:21:25 -0400 From: Fam Zheng Date: Tue, 13 Aug 2013 09:21:08 +0800 Message-Id: <1376356869-19417-4-git-send-email-famz@redhat.com> In-Reply-To: <1376356869-19417-1-git-send-email-famz@redhat.com> References: <1376356869-19417-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH v2 3/4] vmdk: support vmfs files List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, jcody@redhat.com, famz@redhat.com, stefanha@redhat.com From: Paolo Bonzini VMware ESX hosts also use different create and extent types for flat files, respectively "vmfs" and "VMFS". This is not documented, but it can be found at http://kb.vmware.com/kb/10002511 (Recreating a missing virtual machine disk (VMDK) descriptor file). Signed-off-by: Paolo Bonzini Signed-off-by: Fam Zheng --- block/vmdk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 2cc9594..b653e2e 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -719,7 +719,7 @@ static int vmdk_parse_extents(const char *desc, BlockDriverState *bs, if (sectors <= 0 || (strcmp(type, "FLAT") && strcmp(type, "SPARSE") && - strcmp(type, "VMFSSPARSE")) || + strcmp(type, "VMFS") && strcmp(type, "VMFSSPARSE")) || (strcmp(access, "RW"))) { goto next_line; } @@ -732,7 +732,7 @@ static int vmdk_parse_extents(const char *desc, BlockDriverState *bs, } /* save to extents array */ - if (!strcmp(type, "FLAT")) { + if (!strcmp(type, "FLAT") || !strcmp(type, "VMFS")) { /* FLAT extent */ VmdkExtent *extent; @@ -790,6 +790,7 @@ static int vmdk_open_desc_file(BlockDriverState *bs, int flags, goto exit; } if (strcmp(ct, "monolithicFlat") && + strcmp(ct, "vmfs") && strcmp(ct, "vmfsSparse") && strcmp(ct, "twoGbMaxExtentSparse") && strcmp(ct, "twoGbMaxExtentFlat")) { -- 1.8.3.1