Bug 1017586 - wrong authority permitted message when attach a read-only VHDX disk
wrong authority permitted message when attach a read-only VHDX disk
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
Unspecified Unspecified
low Severity low
: rc
: ---
Assigned To: Jeff Cody
Virtualization Bugs
Depends On:
Blocks: 1029730
  Show dependency treegraph
Reported: 2013-10-10 04:26 EDT by Sibiao Luo
Modified: 2015-01-27 13:08 EST (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1029730 (view as bug list)
Last Closed: 2015-01-27 13:08:07 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)

  None (edit)
Description Sibiao Luo 2013-10-10 04:26:15 EDT
Description of problem:
boot guest with a VHDX format disk which specified read-only, and then format it in guest with a wrong authority permitted message.

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm-rhev
guest info:
# uname -r

How reproducible:

Steps to Reproduce:
1.create a VHDX image via hyper-V.
# qemu-img info sluo-RHEL6.4.z-32bit.vhdx
image: sluo-RHEL6.4.z-32bit.vhdx
file format: vhdx
virtual size: 10G (10737418240 bytes)
disk size: 3.4G
2.copy the vhdx image into localhost and boot guest with this VHDX image as data disk which was specified read-only.
e.g:... -drive file=/home/sluo-RHEL6.4.z-32bit.vhdx,if=none,id=drive-virtio-disk1,format=vhdx,cache=none,aio=native,werror=stop,rerror=stop,readonly -device virtio-blk-pci,vectors=0,bus=pci.0,addr=0x7,scsi=off,drive=drive-virtio-disk1,id=virtio-disk1,bootindex=2
3.format the data disk in guest.
# mkfs.ext4 /dev/vdX

Actual results:
after step 3, the VHDX disk(/dev/vdb) has a wrong authority permitted message.
# mkfs.ext4 /dev/vdb
mke2fs 1.41.12 (17-May-2010)
/dev/vdb is apparently in use by the system; will not make a filesystem here!

Expected results:
It should prompt a warning message(Operation not permitted), like:
# mkfs.ext3 /dev/vdb
/dev/vdb: Operation not permitted while setting up superblock

Additional info:
Comment 1 Sibiao Luo 2013-10-10 04:28:28 EDT
# /usr/libexec/qemu-kvm -M pc -S -cpu SandyBridge -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -no-kvm-pit-reinjection -usb -device usb-tablet,id=input0 -name sluo -uuid 990ea161-6b67-47b2-b803-19fb01d30d31 -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 -device virtserialport,chardev=channel2,name=com.redhat.rhevm.vdsm,bus=virtio-serial0.0,id=port2 -drive file=/home/RHEL6.5-20131004.5_6.5_Server_x86_64.qcow2,if=none,id=drive-virtio-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop -device virtio-blk-pci,vectors=0,bus=pci.0,addr=0x4,scsi=off,drive=drive-virtio-disk,id=virtio-disk,bootindex=1 -netdev tap,id=hostnet0,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=08:2E:5F:0A:0D: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 -vnc :1 -monitor stdio -drive file=/home/sluo-RHEL6.4.z-32bit.vhdx,if=none,id=drive-virtio-disk1,format=vhdx,cache=none,aio=native,werror=stop,rerror=stop,readonly -device virtio-blk-pci,vectors=0,bus=pci.0,addr=0x7,scsi=off,drive=drive-virtio-disk1,id=virtio-disk1,bootindex=2
Comment 4 Ademar Reis 2014-06-12 08:42:12 EDT
Apparently changed to MODIFIED by accident, reverting.

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