Bug 1006662

Summary: fail to boot guest attaching with VHDX format data disk(virito/virtio-scsi interface)
Product: Red Hat Enterprise Linux 7 Reporter: Sibiao Luo <sluo>
Component: qemu-kvmAssignee: Jeff Cody <jcody>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 7.0CC: acathrow, chayang, flang, hhuang, jcody, juzhang, michen, qzhang, virt-maint, xfu
Target Milestone: rcKeywords: TestOnly
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-06 19:41:41 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:

Description Sibiao Luo 2013-09-11 04:35:24 UTC
Description of problem:
create a VHDX format image, then attach it to guest with virtio/virtio-scsi interface specified readonly=on, but qemu fail to boot up.

Version-Release number of selected component (if applicable):
host info:
3.10.0-18.el7.x86_64
qemu-kvm-1.5.3-2.el7.x86_64
seabios-bin-1.7.2.2-2.el7.noarch
guest info:
3.10.0-18.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.create a VHDX image via hyper-V and copy the vhdx image into localhost.
# qemu-img info /home/sluo-rhel6.5-64bit.vhdx
image: /home/sluo-rhel6.5-64bit.vhdx
file format: vhdx
virtual size: 10G (10737418240 bytes)
disk size: 5.8G
2.attach the VHDX image to guest as a data disk with virtio/virtio-scsi interface specified readonly=on.
e.g:...-drive file=/home/sluo-rhel6.5-64bit.vhdx,if=none,format=vhdx,id=drive-data-disk,werror=stop,rerror=stop,readonly=on -device virtio-blk-pci,bus=pci.0,addr=0x7,drive=drive-data-disk,id=data-disk
Warning: option deprecated, use lost_tick_policy property of kvm-pit instead.
qemu-kvm: -drive file=/home/sluo-rhel6.5-64bit.vhdx,if=none,format=vhdx,id=drive-data-disk,werror=stop,rerror=stop,readonly=on: 'vhdx' invalid format
/etc/qemu-ifdown: could not launch network script
e.g:...-drive file=/home/sluo-rhel6.5-64bit.vhdx,if=none,format=vhdx,id=drive-data-disk,werror=stop,rerror=stop,readonly=on -device virtio-scsi-pci,bus=pci.0,addr=0x7,id=scsi0 -device scsi-hd,drive=drive-data-disk,id=data-disk,bus=scsi0.0
Warning: option deprecated, use lost_tick_policy property of kvm-pit instead.
qemu-kvm: -drive file=/home/sluo-rhel6.5-64bit.vhdx,if=none,format=vhdx,id=drive-data-disk,werror=stop,rerror=stop,readonly=on: 'vhdx' invalid format
/etc/qemu-ifdown: could not launch network script

Actual results:

Expected results:
it could boot guest attaching with VHDX data disk(virtio/virtio-scsi) specified readonly=on successfully.

Additional info:
QEMU has supported format=vhdx.
# /usr/libexec/qemu-kvm -drive format=?
Supported formats: vvfat vpc vmdk vhdx vdi sheepdog sheepdog sheepdog raw host_cdrom host_floppy host_device file qed qcow2 qcow parallels nbd nbd nbd iscsi gluster gluster gluster gluster dmg cow cloop bochs blkverify blkdebug

Comment 2 Jeff Cody 2013-09-13 19:25:24 UTC
vhdx needs to be added to the rpm spec template in the drive r/o whitelist

Comment 3 Jeff Cody 2013-11-06 19:41:41 UTC
Closing this as a dupe of BZ 1007176 - it wasn't a dupe when written, but we've consolidated the BZs for adding vpc and vhdx formats to the whitelist.

*** This bug has been marked as a duplicate of bug 1007176 ***