Bug 999779

Summary: Add vpc file format support in qemu-kvm
Product: Red Hat Enterprise Linux 6 Reporter: Sibiao Luo <sluo>
Component: qemu-kvmAssignee: Jeff Cody <jcody>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.5CC: acathrow, bsarathy, chayang, flang, jcody, juzhang, michen, minovotn, mkenneth, qzhang, sluo, virt-maint, xfu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-0.12.1.2-2.402.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-21 07:11:56 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 Sibiao Luo 2013-08-22 05:56:46 UTC
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

Comment 1 Sibiao Luo 2013-08-22 06:00:42 UTC
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

Comment 10 Sibiao Luo 2013-09-12 04:41:09 UTC
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

Comment 18 errata-xmlrpc 2013-11-21 07:11:56 UTC
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