Bug 857616
Summary: | qemu-img does not convert qcow2 correctly into VHD | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Joachim Metz <joachim.metz> |
Component: | qemu | Assignee: | Fedora Virtualization Maintainers <virt-maint> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | low | Docs Contact: | |
Priority: | unspecified | ||
Version: | 16 | CC: | amit.shah, berrange, cfergeau, dwmw2, itamar, knoel, pbonzini, rjones, scottt.tw, virt-maint |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-09-26 08:37:52 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Joachim Metz
2012-09-15 08:10:23 UTC
Virtual PC images require the file size to contain an exact number of cylinders. The size of a disk is 512 * heads * cylinders/head * sectors/cylinder, and there are limitations on the values: - sectors/cylinder must be 17, 31, or 63 - cylinders/head must be less than 1024 unless sectors/cylinder is 63 - heads must be between 4 and 16 for sectors/cylinder = 17, otherwise always 16 In your case, sectors/cylinder must be 63 (because smaller values only work up to roughly 256MB disks) and heads must be 16. Thus, the size of the disk must be a multiple of 63*16*512 = 516096. In fact, the VHD image you get is exactly 512 * 16 heads * 33289 cylinders/head * 63 sectors/cylinder. Thanks for the explanation. According to the MS VHD specification this only applies to ATA disks. I'm not sure if MS still uses this restriction in the format, since VHD files can be larger than the 127 GB ATA media limit. Maybe it's useful that the qemu-img will print a notification if it's changing the characteristics of the disk image. My reading of the specification is that anything above 127GB will specify 65535/16/255 as the geometry, but your disk is smaller than that so it should be rounded.
> Maybe it's useful that the qemu-img will print a notification if it's changing
> the characteristics of the disk image.
Yes, that would be useful.
|