Skip to content

VHD/VPC format compatibility

Jeff Cody qemu-devel 3 versions – Applied

Status from this message: Thanks, applied to the block branch.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 1 replyApplied
  2. v24 patches 0 repliesSuperseded
  3. v14 patches 14 repliesSuperseded

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/4block/vpc: choose size calculation method based on creator_app fieldblock/vpc.c+82 -50 replies
2/4block/vpc: tests for auto-detecting VPC and Hyper-V VHD imagestests/qemu-iotests/146 tests/qemu-iotests/146.out tests/qemu-iotests/group +3 more+153 -00 replies
3/4block/vpc: give option to force the current_size field in .bdrv_createblock/vpc.c+35 -70 replies
4/4block/vpc: add tests for image creation force_size parametertests/qemu-iotests/146 tests/qemu-iotests/146.out+83 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [Qemu-devel] [PATCH v3 0/4] VHD/VPC format compatibility

Changes from v3:

Patch 2: Added a sample image & tests for Disk2vhd
Patch 3: When using force_size, set the CHS geometry to max
(as Disk2vhd does), to maximize backward compatibility (thanks Peter)
Patch 4: Updated test results due to the above changes in patch 3

Changes from v2:

Patches 2,4: Just use qemu-io instead of a qemu instance (thanks Kevin, Max) Patch 3: Use "qem2" for the creator app field, when forcing the size (thanks Kevin)

This is a long-standing issue that has come up many times, and has had several different patches posted to fix it. Virtual PC, and Hyper-V calculate the disk geometry differently for VHD, leading to compatibility issues.

We want to fix these compatibility problems, however we want to make sure we do not break backwards compatibility.

There are two areas of compatibility addressed:

* Reading images (Patch 1)
* Creating images (Patch 3)

Please see the commit messages in Patches 1,3 for details.

Jeff Cody (4):
block/vpc: choose size calculation method based on creator_app field block/vpc: tests for auto-detecting VPC and Hyper-V VHD images block/vpc: give option to force the current_size field in .bdrv_create block/vpc: add tests for image creation force_size parameter

 block/vpc.c                                        | 129 ++++++++++++++--
 tests/qemu-iotests/146                             | 165 +++++++++++++++++++++
 tests/qemu-iotests/146.out                         |  70 +++++++++
 tests/qemu-iotests/group                           |   1 +
 .../sample_images/d2v-zerofilled.vhd.bz2           | Bin 0 -> 1021 bytes
 .../sample_images/hyperv2012r2-dynamic.vhd.bz2     | Bin 0 -> 214 bytes
 .../sample_images/virtualpc-dynamic.vhd.bz2        | Bin 0 -> 212 bytes
 7 files changed, 353 insertions(+), 12 deletions(-)
 create mode 100755 tests/qemu-iotests/146
 create mode 100644 tests/qemu-iotests/146.out
 create mode 100644 tests/qemu-iotests/sample_images/d2v-zerofilled.vhd.bz2
 create mode 100644 tests/qemu-iotests/sample_images/hyperv2012r2-dynamic.vhd.bz2
 create mode 100644 tests/qemu-iotests/sample_images/virtualpc-dynamic.vhd.bz2
Signature · 1 line
1.9.3