Bug 977760 - fail to boot guest attaching with vmdk format data disk(virito/virtio-scsi interface)
fail to boot guest attaching with vmdk format data disk(virito/virtio-scsi in...
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
Unspecified Unspecified
high Severity medium
: rc
: ---
Assigned To: Fam Zheng
Virtualization Bugs
Depends On:
  Show dependency treegraph
Reported: 2013-06-25 05:35 EDT by Sibiao Luo
Modified: 2013-11-21 02:01 EST (History)
12 users (show)

See Also:
Fixed In Version: qemu-kvm-
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 987775 (view as bug list)
Last Closed: 2013-11-21 02:01:17 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:1553 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2013-11-20 16:40:29 EST

  None (edit)
Description Sibiao Luo 2013-06-25 05:35:08 EDT
Description of problem:
create a vmdk format data disk, 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:
guest info:

How reproducible:

Steps to Reproduce:
1.create a vmdk format data disk.
# qemu-img create -f vmdk vmdk-data-disk.vmdk 10G
Formatting 'vmdk-data-disk.vmdk', fmt=vmdk size=10737418240 compat6=off zeroed_grain=off 
# qemu-img info vmdk-data-disk.vmdk 
image: vmdk-data-disk.vmdk
file format: vmdk
virtual size: 10G (10737418240 bytes)
disk size: 12K
2.attach it to guest with virtio/virtio-scsi interface specified readonly=on to boot a guest.
...-drive file=/home/vmdk-data-disk.vmdk,if=none,id=drive-data-disk,format=vmdk,readonly -device virtio-blk-pci,drive=drive-data-disk,id=data-disk
...-drive file=/home/vmdk-data-disk.vmdk,if=none,format=vmdk,id=drive-data-disk,cache=none,aio=native,serial=QEMU-DISK2,readonly=on -device virtio-scsi-pci,bus=pci.0,addr=0x8,id=scsi0 -device scsi-hd,drive=drive-data-disk,id=data-disk,bus=scsi0.0

Actual results:
after step 2, qemu fail to boot up guest with prompt that 'vmdk' invalid format.
...-drive file=/home/vmdk-data-disk.vmdk,if=none,format=vmdk,id=drive-data-disk,cache=none,aio=native,serial=QEMU-DISK2,readonly=on -device virtio-scsi-pci,bus=pci.0,addr=0x8,id=scsi0 -device scsi-hd,drive=drive-data-disk,id=data-disk,bus=scsi0.0
qemu-kvm: -drive file=/home/vmdk-data-disk.vmdk,if=none,format=vmdk,id=drive-data-disk,cache=none,aio=native,serial=QEMU-DISK2,readonly=on: 'vmdk' invalid format

...-drive file=/home/vmdk-data-disk.vmdk,if=none,id=drive-data-disk,format=vmdk,readonly=on -device virtio-blk-pci,drive=drive-data-disk,id=data-disk
qemu-kvm: -drive file=/home/vmdk-data-disk.vmdk,if=none,id=drive-data-disk,format=vmdk,readonly=on: 'vmdk' invalid format

Expected results:
it could boot guest attaching with vmdk data disk(virtio/virtio-scsi) successfully.

Additional info:
Comment 1 Sibiao Luo 2013-06-25 05:37:48 EDT
my whole qemu-kvm command line:
# /usr/libexec/qemu-kvm -M rhel6.5.0 -S -enable-kvm -m 4096 -smp 4,sockets=2,cores=2,threads=1 -no-kvm-pit-reinjection -uuid 350e716b-5f98-4bf0-9a2a-c8e423295244 -rtc base=localtime,clock=host,driftfix=slew -device virtio-serial-pci,id=virtio-serial0,max_ports=16,vectors=0,bus=pci.0,addr=0x3 -chardev socket,id=channel1,path=/tmp/helloworld1,server,nowait -device virtserialport,chardev=channel1,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port1 -chardev socket,id=channel2,path=/tmp/helloworld2,server,nowait -drive file=/home/RHEL-Server-6.4-64-virtio.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device e1000,netdev=hostnet0,id=virtio-net-pci0,mac=08:2E:5F:0A:1D:B1,bus=pci.0,addr=0x5 -device virtio-balloon-pci,id=ballooning,bus=pci.0,addr=0x6 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -k en-us -boot menu=on -qmp tcp:0:4444,server,nowait -serial unix:/tmp/ttyS0,server,nowait -spice port=5930,disable-ticketing -vga qxl -global qxl-vga.vram_size=67108864 -monitor stdio -device virtio-serial-pci,id=virtio-serial1 -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0 -drive file=/home/vmdk-data-disk.vmdk,if=none,id=drive-data-disk,format=vmdk,readonly=on -device virtio-blk-pci,drive=drive-data-disk,id=data-disk
Comment 2 Fam Zheng 2013-06-26 05:40:09 EDT
Build flags are incomplete for block driver whitelist, will fix by adding vmdk to readonly driver list.
Comment 6 Miroslav Rezanina 2013-07-18 05:38:11 EDT
Fixed in qemu-kvm-
Comment 7 Sibiao Luo 2013-07-22 07:28:16 EDT
Verify this issue on qemu-kvm-

host info:
guest info:

same to comment #0

It cand boot guest attaching with vmdk data disk(virtio/virtio-scsi) successfully.
e.g1:...-drive file=/home/vmdk-data-disk.vmdk,if=none,format=vmdk,id=drive-data-disk,cache=none,aio=native,serial=QEMU-DISK2,readonly=on -device virtio-scsi-pci,bus=pci.0,addr=0x8,id=scsi0 -device scsi-hd,drive=drive-data-disk,id=data-disk,bus=scsi0.0
# fdisk -l | grep /dev/sda
Disk /dev/sda: 10.7 GB, 10737418240 bytes
# mkfs.ext4 /dev/sda
mke2fs 1.41.12 (17-May-2010)
/dev/sda is entire device, not just one partition!
Proceed anyway? (y,n) y
/dev/sda: Read-only file system while setting up superblock

e.g2:...-drive file=/home/vmdk-data-disk.vmdk,if=none,id=drive-data-disk,format=vmdk,readonly=on -device virtio-blk-pci,drive=drive-data-disk,id=data-disk
# fdisk -l | grep /dev/vda
Disk /dev/vda: 10.7 GB, 10737418240 bytes
# mkfs.ext4 /dev/vda
mke2fs 1.41.12 (17-May-2010)
/dev/vda: Operation not permitted while setting up superblock

Base on above, this issue has been fixed correctly.

Best Regards,
Comment 11 errata-xmlrpc 2013-11-21 02:01:17 EST
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.


Note You need to log in before you can comment on or make changes to this bug.