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 920924 - guest only can detect one floppy when add two floppy to guest using '-drive...-global...' in cli
Summary: guest only can detect one floppy when add two floppy to guest using '-drive.....
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-13 05:31 UTC by Sibiao Luo
Modified: 2013-03-15 01:44 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-14 14:53:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sibiao Luo 2013-03-13 05:31:23 UTC
Description of problem:
boot guest with two floppy to guest using '-drive...-global...' method in cli, but guest only can detect one floppy in guest, both windows and rhel guest can hit this issue. btw, if use '-fda...-fdb...' method, the guest can detect them correctly.

Version-Release number of selected component (if applicable):
host info:
kernel-3.8.0-0.40.el7.x86_64
qemu-kvm-1.4.0-1.el7.x86_64
guest info:
kernel-3.8.0-0.40.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot guest with two floppies using '-drive...-global...' method.
e.g:...-drive file=/home/floppy1,if=none,id=drive-fdc0-0-0,format=raw -global isa-fdc.driveA=drive-fdc0-0-0 -drive file=/home/floppy2,if=none,id=drive-fdc0-1-0,format=raw -global isa-fdc.driveA=drive-fdc0-1-0
2.modprobe floppy in guest.
3.check the floppy number.
# ls -l /dev/fd*
  
Actual results:
after step 3, only one floppy can be detected in guest.
# ls -l /dev/fd*
lrwxrwxrwx. 1 root root     13 Mar 13 08:57 /dev/fd -> /proc/self/fd
brw-rw----. 1 root floppy 2, 0 Mar 13 08:57 /dev/fd0

Expected results:
two floppy should be detected correctly in guest.
# ls -l /dev/fd*
lrwxrwxrwx. 1 root root     13 Mar 13 08:57 /dev/fd -> /proc/self/fd
brw-rw----. 1 root floppy 2, 0 Mar 13 08:57 /dev/fd0
brw-rw----. 1 root floppy 2, 0 Mar 13 08:57 /dev/fd1

Additional info:
1.if i use '-fda /home/floppy1 -fdb /home/floppy2':
# ls -l /dev/fd*
lrwxrwxrwx. 1 root root     13 Mar 13 09:29 /dev/fd -> /proc/self/fd
brw-rw----. 1 root floppy 2, 0 Mar 13 09:29 /dev/fd0
brw-rw----. 1 root floppy 2, 1 Mar 13 09:29 /dev/fd1

2.if i use '-fda /home/floppy1 -drive file=/home/floppy2,if=none,id=drive-fdc0-0-0,format=raw -global isa-fdc.driveA=drive-fdc0-0-0'
# ls -l /dev/fd*
lrwxrwxrwx. 1 root root     13 Mar 13 09:28 /dev/fd -> /proc/self/fd
brw-rw----. 1 root floppy 2, 0 Mar 13 09:28 /dev/fd0

Comment 1 Sibiao Luo 2013-03-13 05:34:12 UTC
My qemu-kvm command line:
# /usr/libexec/qemu-kvm -S -M pc-i440fx-1.4 -cpu SandyBridge -enable-kvm -m 2048 -smp 4,sockets=2,cores=2,threads=1 -no-kvm-pit-reinjection -usb -device usb-tablet,id=input0 -device usb-mouse,id=mouse -name sluo-test -uuid b03eea94-a502-4142-b541-96f86473a07a -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/RHEL-Server-7.0-64-scsi.qcow2,if=none,id=drive-system-disk,format=qcow2,cache=none,aio=native,werror=stop,rerror=stop,serial=QEMU-DISK1 -device virtio-scsi-pci,id=scsi0,addr=0x4 -device scsi-hd,bus=scsi0.0,drive=drive-system-disk,id=system-disk,bootindex=1 -drive file=/home/my-data-disk.qcow2,if=none,id=drive-data-disk,format=qcow2,werror=stop,rerror=stop -device virtio-scsi-pci,id=scsi1,addr=0x5 -device scsi-hd,bus=scsi1.0,drive=drive-data-disk,id=data-disk -netdev tap,id=hostnet0,vhost=off,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=virtio-net-pci0,mac=08:2E:5F:0A:1D:B1,bus=pci.0,addr=0x6,bootindex=2,event_idx=off -device virtio-balloon-pci,id=ballooning,bus=pci.0,addr=0x7 -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -serial unix:/tmp/ttyS0,server,nowait -k en-us -qmp tcp:0:4444,server,nowait -boot menu=on -vnc :1 -monitor stdio -drive file=/home/floppy1,if=none,id=drive-fdc0-0-0,format=raw -global isa-fdc.driveA=drive-fdc0-0-0 -drive file=/home/floppy2,if=none,id=drive-fdc0-1-0,format=raw -global isa-fdc.driveA=drive-fdc0-1-

Comment 2 Paolo Bonzini 2013-03-14 14:53:19 UTC
For two disks, the second -global option must be for isa-fdc.driveB.

Comment 3 Sibiao Luo 2013-03-15 01:44:20 UTC
(In reply to comment #2)
> For two disks, the second -global option must be for isa-fdc.driveB.
correct, I forget modify it, thx for your kindly reminds.
e.g:...-drive file=/home/floppy1,if=none,id=drive-fdc0-0-0,format=raw -global isa-fdc.driveA=drive-fdc0-0-0 -drive file=/home/floppy2,if=none,id=drive-fdc0-1-0,format=raw -global isa-fdc.driveB=drive-fdc0-1-0

# ls -l /dev/fd*
lrwxrwxrwx. 1 root root     13 Mar 15 05:42 /dev/fd -> /proc/self/fd
brw-rw----. 1 root floppy 2, 0 Mar 15 05:42 /dev/fd0
brw-rw----. 1 root floppy 2, 1 Mar 15 05:42 /dev/fd1


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