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 593237 - start domain failed with readonly floppy.
Summary: start domain failed with readonly floppy.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Daniel Veillard
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 593256
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-18 09:29 UTC by dyuan
Modified: 2010-09-09 07:29 UTC (History)
7 users (show)

Fixed In Version: libvirt-0.8.1-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-02 19:33:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description dyuan 2010-05-18 09:29:57 UTC
Description of problem:
When I add a floppy into guest with readonly flag, domain will be started failed with error: 
internal error Process exited while reading console log output: char device redirected to /dev/pts/1
qemu: readonly flag not supported for drive with this interface

remove the floppy or no readonly flag, domain can be started successfully.


Version-Release number of selected component (if applicable):
libvirt-0.8.1-4.el6.x86_64
kernel-2.6.32-26.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. prepare a guest , which is shutoff
# virsh list --all
 Id Name                 State
----------------------------------
  - demo                 shut off

2. insert following xml into the "<device>" node of xml
# virsh edit demo.xml

    <disk type='file' device='floppy'>
      <driver name='qemu' type='raw'/>
      <source file='/var/lib/libvirt/images/fd.img'/>
      <target dev='fda' bus='fdc'/>
      <readonly/>
    </disk>

3. create fd.img
# dd if=/dev/zero of=/var/lib/libvirt/images/fd.img bs=1024 count=10240


4. format the floppy disk in ext3 format.
# mkfs.ext3 /var/lib/libvirt/images/fd.img

5. start the guest
# virsh start demo
  
Actual results:
# virsh start demo
error: Failed to start domain rhel5u4_x86_64
error: internal error Process exited while reading console log output: char device redirected to /dev/pts/1
qemu: readonly flag not supported for drive with this interface

Expected results:
# virsh start demo
Domain demo started

Additional info:

# tail -f /var/log/messages
May 18 17:12:13 dhcp-66-70-43 kernel: device vnet0 entered promiscuous mode
May 18 17:12:13 dhcp-66-70-43 kernel: virbr0: topology change detected, propagating
May 18 17:12:13 dhcp-66-70-43 kernel: virbr0: port 1(vnet0) entering forwarding state
May 18 17:12:13 dhcp-66-70-43 NetworkManager[1583]: <warn> /sys/devices/virtual/net/vnet0: couldn't determine device driver; ignoring...
May 18 17:12:13 dhcp-66-70-43 kernel: virbr0: port 1(vnet0) entering disabled state
May 18 17:12:13 dhcp-66-70-43 kernel: device vnet0 left promiscuous mode
May 18 17:12:13 dhcp-66-70-43 kernel: virbr0: port 1(vnet0) entering disabled state
May 18 17:12:13 dhcp-66-70-43 libvirtd: 17:12:13.318: error : qemudReadLogOutput:2250 : internal error Process exited while reading console log output: char device redirected to /dev/pts/1#012qemu: readonly flag not supported for drive with this interface#012
May 18 17:12:13 dhcp-66-70-43 libvirtd: 17:12:13.386: error : SELinuxRestoreSecurityFileLabel:378 : internal error cannot restore selinux file label for /mnt/vol/rhel6_i386.img

Comment 1 Daniel Berrangé 2010-05-18 09:39:03 UTC
Please provide the QEMU command line for this guest from /var/log/libvirt/qemu/$GUEST.log

Comment 3 dyuan 2010-05-18 09:46:15 UTC
# tail -f /var/log/messages
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=none /usr/libexec/qemu-kvm -S -M rhel6.0.0 -enable-kvm -m 512 -smp 1,sockets=1,cores=1,threads=1 -name demo -uuid 0e43537d-1ef5-9166-bc29-c95aa41fb85b -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/demo.monitor,server,nowait -mon chardev=monitor,mode=control -rtc base=utc -boot c -drive file=/mnt/vol/rhel6_i386.img,if=none,id=drive-ide0-0-0,boot=on -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -drive file=/var/lib/libvirt/images/fd.img,if=none,id=drive-fdc0-0-0,readonly=on,format=raw -global isa-fdc.driveA=drive-fdc0-0-0 -netdev tap,fd=20,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:76:13:2d,bus=pci.0,addr=0x4 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -vnc 127.0.0.1:1 -k en-us -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 
char device redirected to /dev/pts/4
qemu: readonly flag not supported for drive with this interface

Comment 4 dyuan 2010-05-18 09:47:36 UTC
# tail -f /var/log/messages
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=none /usr/libexec/qemu-kvm -S -M rhel6.0.0 -enable-kvm -m 512 -smp 1,sockets=1,cores=1,threads=1 -name demo -uuid 0e43537d-1ef5-9166-bc29-c95aa41fb85b -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/demo.monitor,server,nowait -mon chardev=monitor,mode=control -rtc base=utc -boot c -drive file=/mnt/vol/rhel6_i386.img,if=none,id=drive-ide0-0-0,boot=on -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -drive file=/var/lib/libvirt/images/fd.img,if=none,id=drive-fdc0-0-0,readonly=on,format=raw -global isa-fdc.driveA=drive-fdc0-0-0 -netdev tap,fd=20,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:76:13:2d,bus=pci.0,addr=0x4 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -vnc 127.0.0.1:1 -k en-us -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 
char device redirected to /dev/pts/4
qemu: readonly flag not supported for drive with this interface

Comment 5 Daniel Berrangé 2010-05-18 10:36:50 UTC
This is a KVM bug 593256

Comment 6 RHEL Program Management 2010-06-07 16:00:06 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 7 Daniel Berrangé 2010-06-08 14:03:07 UTC
The fix is in qemu-kvm-0.12.1.2-2.71.el6

You should be able to verify this from libvirt now

Comment 9 releng-rhel@redhat.com 2010-07-02 19:33:48 UTC
Red Hat Enterprise Linux Beta 2 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Comment 10 Nan Zhang 2010-09-09 07:29:47 UTC
Verified with libvirt-0.8.1-27.el6.x86_64 & qemu-kvm-0.12.1.2-2.113.el6.x86_64.

# dd if=/dev/zero of=/var/lib/libvirt/images/fd.img bs=1M count=10
10+0 records in
10+0 records out
10485760 bytes (10 MB) copied, 0.0161993 s, 647 MB/s

# virsh edit rhel6
Domain rhel6 XML configuration edited.

# virsh start rhel6
Domain rhel6 started


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