[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/2] vmdk: support vmfs files
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PATCH 2/2] vmdk: support vmfs files |
Date: |
Sun, 11 Aug 2013 18:13:58 +0200 |
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 <address@hidden>
---
block/vmdk.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/block/vmdk.c b/block/vmdk.c
index eaf484a..2a5b63d 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -751,7 +751,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;
}
@@ -764,7 +764,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;
@@ -829,6 +829,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