diff options
author | Fam Zheng <famz@redhat.com> | 2015-09-17 13:04:10 +0800 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2016-03-22 17:41:04 -0500 |
commit | acea76c162a51fa3c65426d64c74cfc67063df00 (patch) | |
tree | ba977f7a1200bac04e34bc16ed5bad6f4e79d3dd | |
parent | 80b6e5723fac428ea6c08c821078286f43975df8 (diff) | |
download | hqemu-acea76c162a51fa3c65426d64c74cfc67063df00.zip hqemu-acea76c162a51fa3c65426d64c74cfc67063df00.tar.gz |
vmdk: Create streamOptimized as version 3
VMware products accept only version 3 for streamOptimized, let's bump
the version.
Reported-by: Radoslav Gerganov <rgerganov@vmware.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit d62d9dc4b814950dcc8bd261a3e2e9300d9065e6)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
-rw-r--r-- | block/vmdk.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/block/vmdk.c b/block/vmdk.c index 6f819e4..26b76d9 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1654,7 +1654,13 @@ static int vmdk_create_extent(const char *filename, int64_t filesize, } magic = cpu_to_be32(VMDK4_MAGIC); memset(&header, 0, sizeof(header)); - header.version = zeroed_grain ? 2 : 1; + if (compress) { + header.version = 3; + } else if (zeroed_grain) { + header.version = 2; + } else { + header.version = 1; + } header.flags = VMDK4_FLAG_RGD | VMDK4_FLAG_NL_DETECT | (compress ? VMDK4_FLAG_COMPRESS | VMDK4_FLAG_MARKER : 0) | (zeroed_grain ? VMDK4_FLAG_ZERO_GRAIN : 0); |