Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Qemu-img should support image creation/convertion for VHD(X) image format in RHEL6.5, for v2v. Once this issue is fixed, then we will be able to use the qemu-img to create VHDX images.
Comment 9Miroslav Rezanina
2014-07-25 07:51:00 UTC
Fixes already in build, patch not properly updated.
Verified this issue with qemu-kvm-rhev-0.12.1.2-2.431.el6.x86_64.
host info:
# uname -r && rpm -q qemu-kvm-rhev
2.6.32-492.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.431.el6.x86_64
#### scenarios 1.
Use qemu-img to create and read the vpc/vhdx image correctly, and then attach it in KVM as a second disk specified readonly=on.
1.Use qemu-img to create and read the vpc/vhdx image.
# qemu-img create -f vpc my-data-disk.vpc 10G
Formatting 'my-data-disk.vpc', fmt=vpc size=10737418240
# qemu-img info my-data-disk.vpc
image: my-data-disk.vpc
file format: vpc
virtual size: 10G (10737893376 bytes)
disk size: 24K
cluster_size: 2097152
# qemu-img create -f vhdx my-data-disk.vhdx 10G
Formatting 'my-data-disk.vhdx', fmt=vhdx size=10737418240 log_size=1048576 block_size=0 block_state_zero=off
# qemu-img info my-data-disk.vhdx
image: my-data-disk.vhdx
file format: vhdx
virtual size: 10G (10737418240 bytes)
disk size: 272K
cluster_size: 16777216
2.using QEMU, launch a guest with the VHDX data disk as a secondary disk.
e.g:...-drive file=/home/my-data-disk.vhdx,if=none,format=vhdx,id=drive-data-disk,cache=none,werror=stop,rerror=stop,readonly=on -device virtio-blk-pci,bus=pci.0,addr=0x7,drive=drive-data-disk,id=data-disk
Results:
after step 1, use qemu-img to create and read the vpc/vhdx image successfully.
after step 2, using QEMU to launch a guest with the VHDX data disk as a secondary disk(readonly) successfully.
#### scenarios 2.
Use Hyper-V to install OS and generate an image(clean dynamic & fixed image files), then convert it to qcow2/raw format via qemu-img and boot it in KVM environment.
1.Use Hyper-V to install OS and generate an image(clean dynamic & fixed image files).
2.convert it to qcow2/raw format via qemu-img.
# qemu-img convert -p -f vhdx RHEL-7.0.z-Server-x86_64.vhdx -O qcow2 RHEL-7.0.z-Server-x86_64.qcow2
(100.00/100%)
3.boot it in KVM with simulate driver.
e.g:# /usr/libexec/qemu-kvm -M pc -cpu Opteron_G2 -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -no-kvm-pit-reinjection -usb -device usb-tablet,id=input0 -name sluo -uuid 990ea161-6b67-47b2-b803-19fb01d30d30 -rtc base=localtime,clock=host,driftfix=slew -drive file=/home/RHEL-7.0.z-Server-x86_64.qcow2,if=none,id=drive-system-disk,format=qcow2,cache=none,aio=native -device ide-drive,drive=drive-system-disk,id=system-disk,bus=ide.0,unit=0 -k en-us -boot menu=on -qmp tcp:0:4444,server,nowait -serial unix:/tmp/ttyS0,server,nowait -vnc :1 -spice disable-ticketing,port=5931 -monitor stdio
4.reboot/shutdown/poweroff guest.
Results:
after step 2, it convert successfully.
after step 3, boot up in KVM successfully.
after step 4, reboot/shutdown/poweroff VM successfully.
Base on above, this issue has been fixed correctly, move to VERIFIED status, please correct me if any mistake.
Best Regards,
sluo
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHBA-2014-1490.html