Bug 597147

Summary: libvirt: kvm disk error after first stage install of Win2K or WinXP
Product: Red Hat Enterprise Linux 6 Reporter: Huzaifa S. Sidhpurwala <huzaifas>
Component: qemu-kvmAssignee: Markus Armbruster <armbru>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 6.0CC: amit.shah, bburns, berrange, clalance, crobinso, ddumas, ehabkost, itamar, jforbes, kcao, lihuang, llim, paul, rjones, syeghiay, veillard, virt-maint, virt-maint, xen-maint
Target Milestone: betaKeywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: qemu-kvm-0.12.1.2-2.68.2.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 579348 Environment:
Last Closed: 2010-07-02 19:45:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 508787    
Attachments:
Description Flags
winXP installation none

Description Huzaifa S. Sidhpurwala 2010-05-28 08:59:30 UTC
+++ This bug was initially created as a clone of Bug #579348 +++

Description of problem:
I can do the first part of the install for either WinXP or Win2K using virt-manager, but on reboot I keep getting a disk error

Version-Release number of selected component (if applicable):
libvirt-0.7.7-3.fc14.i686
qemu-0.12.3-4.fc14.i686
virt-manager-0.8.4-1.fc14.noarch

How reproducible:
Always

Steps to Reproduce:
1. Ensure virtd is running
2. Use either qemu or virt-manager to install WinXP or Win2K (I have 1Gb of memory set for it on a 25Gb virtual drive)
3. Allow it to run it's course and do a reset
  
Actual results:
virt-manager reports

Booting from hard disk

A disk read error has occurred
Press CTRL-ALT-DEL to restart

Expected results:
The installed WinXP or Win2K runs

Additional info:
May be related to 

http://article.gmane.org/gmane.comp.emulators.qemu/66135

Comment 1 Daniel Berrangé 2010-05-28 09:03:20 UTC
Those versions in Fedora are very different to what's in RHEL. Please confirm what RHEL6 RPM versions you have reproduced this with.

Comment 3 Huzaifa S. Sidhpurwala 2010-05-28 09:51:38 UTC
libvirt-0.8.1-3.el6.x86_64
virt-manager-0.8.4-1.el6.noarch
qemu-kvm-tools-0.12.1.2-2.52.el6.x86_64
qemu-kvm-0.12.1.2-2.52.el6.x86_64
gpxe-roms-qemu-0.9.7-6.3.el6.noarch
qemu-img-0.12.1.2-2.52.el6.x86_64

Comment 4 Huzaifa S. Sidhpurwala 2010-05-31 08:56:44 UTC
ping, any thing on this ?

This seems to fix the problem though:
http://tinyempire.com/notes/ntldrismissing.htm

Comment 5 RHEL Program Management 2010-06-01 22:06:05 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 6 Daniel Berrangé 2010-06-02 10:30:16 UTC
>  I've been able to determine that there is a CMOS byte which indicates to the
> BIOS what IDE drives should use translation. This gets handled correctly for
> the old way of specifying drives, but the same isn't done in the qdev storage
> device code.

This comment from the URL in the initial description strongly points to QEMU as the source of the bug. It says that the old style '-drive' options work, but the new '-drive + -device' style does not. There is a chance this may be accidentally fixed by Markus' new '-blockdev' work which replaces '-drive' entirely, but re-assigning to QEMU to make sure this isn't missed.

Comment 7 Markus Armbruster 2010-06-05 06:13:44 UTC
I'm pretty sure Dan is right and this is actually a QEMU bug.  Looks like the code to set up the CMOS byte 0x39 (upstream: last thing in pc_cmos_init()) runs only for drives defined with -drive if=ide and its shortcuts, not for drives defined with -drive if=none & -device.  Needs fixing upstream.

Comment 19 Bill Burns 2010-06-22 16:36:26 UTC
Fix does not work, moving back to assigned

Comment 27 lihuang 2010-06-28 11:44:04 UTC
Created attachment 427389 [details]
winXP installation

Test on qemu-kvm-0.12.1.2-2.68.2.el6 and qemu-kvm-0.12.1.2-2.79.el6
the orignal issue (disk read error) is fixed.

After first reboot.CDROM is disconnected. (bug 607083). Re-attach the cdrom,then window XP guest could be installed successfully.


CLI of first stage : 
qemu      3975     1 75 05:48 ?        00:00:13 /usr/libexec/qemu-kvm -S -M rhel6.0.0 -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -name winxp -uuid 7fb9ed42-94a8-e5b2-ae54-157902cd3da4 -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/winxp.monitor,server,nowait -mon chardev=monitor,mode=control -rtc base=localtime -no-reboot -boot d -drive file=/home/images/winxp.img,if=none,id=drive-ide0-0-0,format=raw -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -drive file=/data/nfs-win/xp/en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=20,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:89:5a:6c,bus=pci.0,addr=0x4 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -device usb-tablet,id=input0 -vnc 127.0.0.1:0 -k en-us -vga std -device AC97,id=sound0,bus=pci.0,addr=0x5 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3


CLI after disconnect CDROM.
qemu      5833     1 99 06:16 ?        02:16:37 /usr/libexec/qemu-kvm -S -M rhel6.0.0 -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -name winxp -uuid 7fb9ed42-94a8-e5b2-ae54-157902cd3da4 -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/winxp.monitor,server,nowait -mon chardev=monitor,mode=control -rtc base=localtime -no-reboot -boot c -drive file=/home/images/winxp.img,if=none,id=drive-ide0-0-0,boot=on,format=raw -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -netdev tap,fd=20,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:89:5a:6c,bus=pci.0,addr=0x4 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -device usb-tablet,id=input0 -vnc 127.0.0.1:0 -k en-us -vga std -device AC97,id=sound0,bus=pci.0,addr=0x5 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3


CLI after re-attachin CDROM and restart.
qemu     10790     1 99 07:26 ?        00:01:22 /usr/libexec/qemu-kvm -S -M rhel6.0.0 -enable-kvm -m 2048 -smp 2,sockets=2,cores=1,threads=1 -name winxp -uuid 7fb9ed42-94a8-e5b2-ae54-157902cd3da4 -nodefaults -chardev socket,id=monitor,path=/var/lib/libvirt/qemu/winxp.monitor,server,nowait -mon chardev=monitor,mode=control -rtc base=localtime -boot c -drive file=/home/images/winxp.img,if=none,id=drive-ide0-0-0,boot=on,format=raw -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -drive file=/data/nfs-win/xp/en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=20,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:89:5a:6c,bus=pci.0,addr=0x4 -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -device usb-tablet,id=input0 -vnc 127.0.0.1:0 -k en-us -vga std -device AC97,id=sound0,bus=pci.0,addr=0x5 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3

Comment 28 Lawrence Lim 2010-06-28 12:57:00 UTC
Updating the state of the bug.

Comment 29 lihuang 2010-06-28 14:54:21 UTC
FYI:
in comment#27,host is installed from RHEL6.0-20100622.1 installation tree .

[root@t70 ~]# rpm -q libvirt
libvirt-0.8.1-7.el6.x86_64
[root@t70 ~]# rpm -q kernel
kernel-2.6.32-37.el6.x86_64
[root@t70 ~]# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.68.2.el6.x86_64
[root@t70 ~]# rpm -q virt-manager
virt-manager-0.8.4-3.el6.noarch

command line is grabbed from 'ps'. I started the guest from virt-manager.
nothing  special in installation steps,just follow the "New VM" wizard: 
New VM--> Use ISO image -> ...

steps for re-attaching CDROM
1. Details --> Add Hardware
2. Hardware type : Storage .
3. navigate to the ISO and change device type to "IDE cdrom"
4. Click "Yes" on the confirm dialogue
5. shutdown guest and run again.

Comment 30 releng-rhel@redhat.com 2010-07-02 19:45:55 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.