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.
Bug 977760 - fail to boot guest attaching with vmdk format data disk(virito/virtio-scsi interface)
Summary: fail to boot guest attaching with vmdk format data disk(virito/virtio-scsi in...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.5
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Fam Zheng
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-25 09:35 UTC by Sibiao Luo
Modified: 2013-11-21 07:01 UTC (History)
12 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.380.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 987775 (view as bug list)
Environment:
Last Closed: 2013-11-21 07:01:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:1553 0 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2013-11-20 21:40:29 UTC

Description Sibiao Luo 2013-06-25 09:35:08 UTC
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:
2.6.32-392.el6.x86_64
qemu-kvm-0.12.1.2-2.376.el6.x86_64
guest info:
2.6.32-392.el6.x86_64

How reproducible:
100%

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.
e.g:
...-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 09:37:48 UTC
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 09:40:09 UTC
Build flags are incomplete for block driver whitelist, will fix by adding vmdk to readonly driver list.

Comment 6 Miroslav Rezanina 2013-07-18 09:38:11 UTC
Fixed in qemu-kvm-0.12.1.2-2.379.el6

Comment 7 Sibiao Luo 2013-07-22 11:28:16 UTC
Verify this issue on qemu-kvm-0.12.1.2-2.379.el6.x86_64.

host info:
2.6.32-398.el6.x86_64
qemu-kvm-0.12.1.2-2.379.el6.x86_64
guest info:
2.6.32-398.el6.x86_64

Steps:
same to comment #0

Results:
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,
sluo

Comment 11 errata-xmlrpc 2013-11-21 07:01:17 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


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