Red Hat Bugzilla – Bug 999779
Add vpc file format support in qemu-kvm
Last modified: 2013-11-21 02:11:56 EST
Description of problem: fail to boot guest with vpcfile format disk with qemu-kvm. btw, from qemu-img man help: vpc - VirtualPC compatible image format (VHD). Does the vpc referred to as vhd ? please correct me if mistake, thanks in advance. Version-Release number of selected component (if applicable): host info: # uname -r && rpm -q qemu-kvm-rhev 2.6.32-412.el6.x86_64 qemu-kvm-rhev-0.12.1.2-2.397.el6.x86_64 How reproducible: 100% Steps to Reproduce: 1.create a vpc file format disk. # qemu-img create -f vpc sluo-data-disk.vhd 10G Formatting 'sluo-data-disk.vhd', fmt=vpc size=10737418240 # qemu-img info sluo-data-disk.vhd image: sluo-data-disk.vhd file format: vpc virtual size: 10G (10737893376 bytes) disk size: 24K 2.boot guest with vpc format file in KVM. e.g:...-drive file=/home/sluo-data-disk.vhd,if=none,id=drive-data-disk,format=vdh,cache=none,werror=stop,rerror=stop,*readonly=on* -device virtio-blk-pci,bus=pci.0,addr=0x7,drive=drive-data-disk,id=data-disk Actual results: after step 2, qemu will quit with prompt that 'vpc' invalid format, like: qemu-kvm: -drive file=/home/sluo-data-disk.vhd,if=none,id=drive-data-disk,format=vpc,cache=none,werror=stop,rerror=stop,readonly=on: 'vpc' invalid format /etc/qemu-ifdown: could not launch network script Expected results: qemu should support the vpc file format. Additional info: # /usr/libexec/qemu-kvm -drive format=? Supported formats: raw cow qcow vdi vmdk cloop dmg bochs vpc vvfat qcow2 qed vhdx parallels nbd blkdebug host_cdrom host_floppy host_device file gluster gluster gluster gluster rbd
Also tried the vhd, vhdx, still the same. 1.format=vhd ...-drive file=/home/sluo-data-disk.vhd,if=none,id=drive-data-disk,format=vhd,cache=none,werror=stop,rerror=stop,readonly=on -device virtio-blk-pci,bus=pci.0,addr=0x7,drive=drive-data-disk,id=data-disk qemu-kvm: -drive file=/home/sluo-data-disk.vhd,if=none,id=drive-data-disk,format=vhd,cache=none,werror=stop,rerror=stop,readonly=on: 'vhd' invalid format /etc/qemu-ifdown: could not launch network script 2.format=vhdx ...-device virtio-blk-pci,bus=pci.0,addr=0x7,drive=drive-data-disk,id=data-disk qemu-kvm: -drive file=/home/sluo-data-disk.vhd,if=none,id=drive-data-disk,format=vhdx,cache=none,werror=stop,rerror=stop,readonly=on: could not open disk image /home/sluo-data-disk.vhd: Invalid argument /etc/qemu-ifdown: could not launch network script
Verify this issue on qemu-kvm-rhev-0.12.1.2-2.401.el6.x86_64 that QEMU has support vpc file format successfully. host info: # uname -r && rpm -q qemu-kvm-rhev 2.6.32-414.el6.x86_64 qemu-kvm-rhev-0.12.1.2-2.401.el6.x86_64 guest info: 2.6.32-414.el6.x86_64 Steps: the same to comment #0 e.g:...-drive file=/home/sluo-data-disk.vpc,if=none,format=vpc,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: It can boot up guest with vpc format disk successfully. Base on above, this issue has been fixed correctly, move to VERIFIED status. 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/RHSA-2013-1553.html