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 1047745 - [RHEL7][virt-manager]File could be created into a readonly virtio-scsi lun disk without error
Summary: [RHEL7][virt-manager]File could be created into a readonly virtio-scsi lun di...
Keywords:
Status: CLOSED DUPLICATE of bug 995415
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Paolo Bonzini
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-02 05:49 UTC by zhengqin
Modified: 2014-02-13 23:55 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-13 23:55:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
libvirtd.log file; /var/log/message; qemu domain log file: rhel6_x86_64.log. (2.69 MB, application/gzip)
2014-01-17 09:10 UTC, zhengqin
no flags Details

Description zhengqin 2014-01-02 05:49:38 UTC
Description of problem:
On latest rhel7, file could be created into a readonly virtio-scsi lun disk without error

Version-Release number of selected component (if applicable):
libvirt-1.1.1-17.el7.x86_64
virt-manager-0.10.0-9.el7.x86_64


How reproducible:
always

Steps to Reproduce:
1. Shut down a Linux vm then open Virtual Machine Details window.
2. Plug a USB disk (such as: /dev/sdb) into the host
3. Click Hardware tab then Click Add Hardware.
4. Select Storage and choose "Select managed or other existing storage" radio button, and input the USB disk path (such as: /dev/sdb), and choose Device type: virtio-scsi lun Disk.
5. Check this added virtio-scsi lun disk as Readonly, Click "Finish" button.
6. Run the virtual machine.
7. Log in the guest, and check the disk will be existed
8. Log in the guest, and mount the disk and create a file in the disk by "dd" command like following:
 # mount /dev/sdb  /mnt
 # dd if =/dev/zero of=/mnt/testFile.img bs=1024 count=100
 # ls /mnt/


Results:
1. testFile.img could be created without error.



Expected results:
1. File could not be created for a Readonly virtio-scsi lun disk


Additional info:
1. If issue "dd" command again after step 8, file could not be created.
2. If umount the usb disk in guest after step 8, and mount it again, you will find that file is not existed in this usb disk.
3. Virtio-scsi lun disk is not existed on virt-manager for RHEL6 host.

Comment 1 Martin Kletzander 2014-01-02 13:54:15 UTC
Please check the logfile and see whether the file was passed to qemu as readonly.  It probably as and this case is a qemu problem, I guess.

Comment 2 zhengqin 2014-01-17 09:10:24 UTC
Created attachment 851473 [details]
libvirtd.log file; /var/log/message;  qemu domain log file: rhel6_x86_64.log.

Comment 3 Paolo Bonzini 2014-01-28 16:17:55 UTC
Command line:

LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin QEMU_AUDIO_DRV=spice /usr/libexec/qemu-kvm -name rhel6_x86_64 -S -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off -m 1024 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid bb56b428-8733-4c20-a01d-783fc0d1e276 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/rhel6_x86_64.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x7 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -drive file=/var/lib/libvirt/images/kvm-rhel6.4-x86_64-raw.img,if=none,id=drive-ide0-0-0,format=raw,cache=none -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -drive file=/dev/sdb,if=none,id=drive-scsi0-0-0-0,readonly=on,format=raw,cache=none -device scsi-block,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0 -netdev tap,fd=23,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:f9:ec:14,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -spice port=5900,addr=127.0.0.1,disable-ticketing,seamless-migration=on -vga qxl -global qxl-vga.ram_size=67108864 -global qxl-vga.vram_size=67108864 -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x6

Comment 5 Paolo Bonzini 2014-02-13 23:55:46 UTC

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


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