Bug 920140

Summary: qemu-kvm emulation of 2.88M floppy fails
Product: Red Hat Enterprise Linux 7 Reporter: Xiaoqing Wei <xwei>
Component: seabiosAssignee: Fam Zheng <famz>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 7.0CC: acathrow, areis, armbru, coolper22, hhuang, juli, juzhang, kwolf, michen, phrdina, rhod, shuang, sluo, virt-maint, xfu
Target Milestone: rcKeywords: TestBlocker
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: seabios-1.7.2.2-3.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 11:40:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Xiaoqing Wei 2013-03-11 12:37:31 UTC
Description of problem:

when unattended installing NT5.x guests,
qemu-kvm emulation of 2.88M floppy fails,
while 1.44M floppy passes the test.


Version-Release number of selected component (if applicable):


How reproducible:
4/4

Steps to Reproduce:
1. unattended install a NT5.x guest (WinXP/Win2003) using 2.88M emulated floppy
2. guest os cant recognize the floppy
3.
  
Actual results:
guest os cant recognize the floppy

Expected results:
guest os can recognize the floppy

Additional info:

guest os can recognize the floppy, when run same test on a rhel6 host.

Comment 2 Coolper 2013-04-11 08:39:46 UTC
I fixed in qemu 1.3.1.
Please try this patch:

--- a/hw/fdc.c
+++ b/hw/fdc.c
@@ -967,6 +967,9 @@
     fdctrl->cur_drv = value & FD_DOR_SELMASK;
 
     fdctrl->dor = value;
+
+    /* set current media rate to fdctrl->dsr */
+    fdctrl->dsr = get_cur_drv(fdctrl)->media_rate;
 }
 
 /* Tape drive register : 0x03 */

Comment 4 Markus Armbruster 2013-04-15 07:50:09 UTC
Thanks for your patch, Pavel will give it a try.

Comment 5 Xiaoqing Wei 2013-08-15 05:38:03 UTC
Hello Pavel Hrdina,

Could you pls tell is there any plan to fix this bug ?
as the official virtio-win floppies are now all 2.88M size,
thus this bug blocking us to test WinXP and Win2003 guests.
adding TestBlocker keyword and raise the severity / priority


Thanks,
Xiaoqing.

Comment 14 Miroslav Rezanina 2013-09-24 09:17:12 UTC
Fix included in seabios-1.7.2.2-3.el7

Comment 16 Jun Li 2013-11-01 10:28:11 UTC
I can not reproduce it.
Version:
qemu-kvm-1.2.0-21.el7.x86_64
seabios-1.7.2-0.2.gita810e4e7.el7.x86_64
----------
<cli>:
# /usr/libexec/qemu-kvm -S -M pc -cpu SandyBridge -enable-kvm -m 4G -smp 4,sockets=2,cores=2,threads=1 -name juli -uuid 355a2475-4e03-4cdd-bf7b-5d6a59edaa61 -rtc base=localtime,clock=host,driftfix=slew -drive file=/mnt/winXP-32-virtio.qcow2,if=none,cache=none,aio=native,format=qcow2,rerror=stop,werror=stop,id=drive0 -device virtio-blk-pci,bus=pci.0,addr=0x8,drive=drive0,id=sys-disk,scsi=off,bootindex=0 -device virtio-balloon-pci,id=ballooning -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -netdev tap,id=hostnet0,vhost=off,script=/etc/qemu-ifup -device virtio-net-pci,vectors=17,netdev=hostnet0,id=virtio-net-pci0,mac=24:be:05:14:2e:8C,addr=0x17,bootindex=2 -k en-us -boot menu=on,reboot-timeout=-1,strict=on -qmp tcp:0:4445,server,nowait -serial unix:/tmp/ttyS0,server,nowait -vnc :3 -spice port=5932,disable-ticketing -vga qxl -monitor stdio -monitor tcp:0:7445,server,nowait -monitor unix:/tmp/monitor1,server,nowait -drive file=/mnt/floppy2.vfd,if=none,id=drive-fdc0-0-0,format=raw,readonly=off -global isa-fdc.driveB=drive-fdc0-0-0

Version:
qemu-kvm-1.5.3-10.el7.x86_64
3.10.0-33.el7.x86_64
seabios-bin-1.7.2.2-3.el7.noarch

WinXP os can recognize the 2.88M floppy. I also test win2003-64 and win2003-32 os, both guest can recognize the 2.88M floppy corrcetly.
As above test results, I think this bug has been verified.

Comment 19 Fam Zheng 2013-11-01 10:39:52 UTC
(In reply to Jun Li from comment #16)
> I can not reproduce it.
> Version:
> qemu-kvm-1.2.0-21.el7.x86_64
> seabios-1.7.2-0.2.gita810e4e7.el7.x86_64
> ----------
> <cli>:
> # /usr/libexec/qemu-kvm -S -M pc -cpu SandyBridge -enable-kvm -m 4G -smp
> 4,sockets=2,cores=2,threads=1 -name juli -uuid
> 355a2475-4e03-4cdd-bf7b-5d6a59edaa61 -rtc
> base=localtime,clock=host,driftfix=slew -drive
> file=/mnt/winXP-32-virtio.qcow2,if=none,cache=none,aio=native,format=qcow2,
> rerror=stop,werror=stop,id=drive0 -device
> virtio-blk-pci,bus=pci.0,addr=0x8,drive=drive0,id=sys-disk,scsi=off,
> bootindex=0 -device virtio-balloon-pci,id=ballooning -global
> PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -netdev
> tap,id=hostnet0,vhost=off,script=/etc/qemu-ifup -device
> virtio-net-pci,vectors=17,netdev=hostnet0,id=virtio-net-pci0,mac=24:be:05:14:
> 2e:8C,addr=0x17,bootindex=2 -k en-us -boot
> menu=on,reboot-timeout=-1,strict=on -qmp tcp:0:4445,server,nowait -serial
> unix:/tmp/ttyS0,server,nowait -vnc :3 -spice port=5932,disable-ticketing
> -vga qxl -monitor stdio -monitor tcp:0:7445,server,nowait -monitor
> unix:/tmp/monitor1,server,nowait -drive
> file=/mnt/floppy2.vfd,if=none,id=drive-fdc0-0-0,format=raw,readonly=off
> -global isa-fdc.driveB=drive-fdc0-0-0
> 
> Version:
> qemu-kvm-1.5.3-10.el7.x86_64
> 3.10.0-33.el7.x86_64
> seabios-bin-1.7.2.2-3.el7.noarch
> 
> WinXP os can recognize the 2.88M floppy. I also test win2003-64 and
> win2003-32 os, both guest can recognize the 2.88M floppy corrcetly.
> As above test results, I think this bug has been verified.

WinXP is already intelligent enough to recognize 2.88M floppy even without this BZ fixed. It's WinXP installation program that couldn't, so we need to verify this by using a floppy during WinXP installation.

Fam

Comment 20 juzhang 2013-11-01 10:43:37 UTC
Back to on_qa since comment19, QE will have a test again.

Comment 21 Jun Li 2013-11-02 05:34:45 UTC
Verifid this bug by manual.
When use the following version of qemu-kvm and seabios to install winXP/win2003-64/win2003-32 guest os, seabios can recognize 2.88M floppy, but can not install guest os. qemu-kvm is in running status, installation interface is black. I will add snapshots in attachments.
Version:
seabios-1.7.2-0.2.gita810e4e7.el7.x86_64
qemu-kvm-1.2.0-21.el7.x86_64

-----
With the following version of qemu-kvm and seabios, installation can start as normal and can use 2.88M floppy correctly.
Version:
qemu-kvm-1.5.3-10.el7.x86_64
3.10.0-33.el7.x86_64
seabios-bin-1.7.2.2-3.el7.noarch


Based on above manual test and comment 19, I think this bug has been fixed. 

Regards,
Juli

Comment 23 Ludek Smid 2014-06-13 11:40:57 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.