FS#25608 - [qemu-kvm] Can not start windows XP anymore.

Attached to Project: Arch Linux
Opened by Javier (jevv) - Tuesday, 16 August 2011, 16:39 GMT
Last edited by Tobias Powalowski (tpowa) - Tuesday, 14 February 2012, 14:23 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tobias Powalowski (tpowa)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

With upgrade of qemu-kvm to 0.15.0-1 on x86-64, I can't start windows XP anymore. It was working fine before though...

The following option makes startup useless (blue screen if starting console, hangs for ever if any other thing including safe mode):

-soundhw ac97

If using virtio for network as follows:

-net nic,model=virtio

Then the following warning always pops up several times:

qemu-kvm: virtio_ioport_write: unexpected address 0x13 value 0x0

And things keep working but network never starts and eventually any user interface dies.

Once the previous is changed by non virtio as follows:

-net nic,model=rtl8139

I got rid of the warnings, but then I still got no user interface working after a while. So I also changed loading the disk image as virtio:

-drive file=$1,if=virtio

By just plain disk image:

-hda $1

And I could advance further. The time I got user interfaces working was a bit longer. Unfortunately after some little more time the user interfaces all die...

I'm trying several things, but nothing seems to work. What shows as a key for a bit improvement is getting rid of sound and also virtio drivers. Getting rid of virtio drivers is a shame, since those allowed a little bit of acceleration on the VM.

BTW, I'm using the right modules:

% lsmod | 'grep' kvm
kvm_intel 53373 3
kvm 328912 1 kvm_intel

And I have been for quiet a while...

Thanks,

Javier.


Additional info:
* package version(s)

% pacman -Ss qemu-kvm
extra/qemu-kvm 0.15.0-1 [installed]
Latest KVM QEMU is a generic and open source processor emulator which
achieves a good emulation speed by using dynamic translation.

% pacman -Ss linux
...
core/linux 3.0.2-1 (base) [installed]
The Linux Kernel and modules
...

* config and/or log files etc.

+++++++++++++++
#!/bin/sh

USERID=`whoami`
IFACE=`sudo tunctl -b -u $USERID`
sudo ifconfig $IFACE 0.0.0.0 promisc up
sudo brctl addif br0 $IFACE

ARGS_GEN="-enable-kvm -drive file=$1,if=virtio -boot order=c -m 512 -rtc base=localtime"
ARGS_NET="-net nic -net tap,ifname=$IFACE,script=no,downscript=no"
ARGS_BIOS0="-smbios file=/home/vasqueja/.qemu_kvm/bios_bin/smbios_type_0.bin"
ARGS_BIOS1="-smbios file=/home/vasqueja/.qemu_kvm/bios_bin/smbios_type_1.bin"
ARGS_VGA="-vga std"
#ARGS_AUDIO="-soundhw ac97"
ARGS_AUDIO=""
ARGS_USB="-usb -usbdevice tablet"
ARGS_CPU=""
ARGS_NIC="-net nic,model=virtio"

echo "Starting QEMU with:"
echo "..."
echo General arguments: $ARGS_GEN
echo Network arguments: $ARGS_NET
echo BIOS0 arguments: $ARGS_BIOS0
echo BIOS1 arguments: $ARGS_BIOS1
echo VGA arguments: $ARGS_VGA
#echo SMB arguments: $ARGS_SMB
echo AUDIO arguments: $ARGS_AUDIO
echo USB arguments: $ARGS_USB
echo CPU arguments: $ARGS_CPU
echo NIC arguments: $ARGS_NIC
echo "...."

qemu-kvm $ARGS_GEN $ARGS_NET $ARGS_BIOS0 $ARGS_BIOS1 $ARGS_VGA $ARGS_AUDIO $ARGS_USB $ARGS_CPU $ARGS_NIC
sudo brctl delif br0 $IFACE
sudo tunctl -d $IFACE
+++++++++++++++


Steps to reproduce:

Start qemu-kvm through the little script shared or equivalent set of options...
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Tuesday, 14 February 2012, 14:23 GMT
Reason for closing:  Works for me
Comment by Tobias Powalowski (tpowa) - Wednesday, 17 August 2011, 06:24 GMT
If available try to install new virtio drivers in XP.
About sound I don't have any clue.
Comment by Jelle van der Waa (jelly) - Wednesday, 17 August 2011, 11:34 GMT
Strange, my XP VM still boots fine on 3.01 and with the latest qemu-kvm. My options are:
qemu-system-x86_64 -enable-kvm -nographic -drive file=xp.img,if=virtio,boot=on -usb -usbdevice host:0bf8:1001 -smp 1 -m 600 -net nic,model=virtio -net user,hostfwd=tcp::5558-:3389 -daemonize
Sound works and virtio too with the drivers from fedora.
Comment by Javier (jevv) - Wednesday, 17 August 2011, 15:42 GMT
Not using virtio helps me to get a bit longer on the VM startup, however I don't get mouse neither keyboard working. So I can't do much on the XP VM after boot. It looks to me it's not just virtio. I've been playing around with options, including not using virtio (as indicated in the original bug text), but that hadn't showed to be enough.

What I'm inclined to do at the moment is see how to go back to previous version of qemu-kvm, though I don't even remember which version was the previous one. I know current one is 0.15.0-1, :-) I'll look at this later on...
Comment by Javier (jevv) - Thursday, 18 August 2011, 17:11 GMT
I got a work around...

Someone mentioned sound was working for him, perhaps with a different driver? For me the ac97 and hda drivers just makes windows freeze and not boot. The other thing I was using was the tablet usb device. That's a good recommendation given that the tablet allows no need to grab the mouse, and one doesn't need to click to get into grab mode, neither use ctrl-alt to get out of grab mode. It makes qemu-kvm like any other application with regard of the mouse and pretty similar to what virtualbox supports with the guest additions... Bad thing the tablet is not working for me and it makes both the mouse and the keyboard useless, and due to that winodws gets useless...

So the work around for me is removing the following options:

-soundhw ac97
-usbdevice tablet

I can live without sound of course (actually I've read complains about sound consuming too much cpu), but I'm really missing the tablet. It's quiet a nice feature.

So what is broken seems to be sound support and tablet usbdevice support.

Just in case, from lspci on the host:

00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
Subsystem: Hewlett-Packard Company Device 30c5
Flags: bus master, fast devsel, latency 0, IRQ 47
Memory at e8024000 (64-bit, non-prefetchable) [size=16K]
Capabilities: <access denied>
Kernel driver in use: HDA Intel
Kernel modules: snd-hda-intel

01:00.0 VGA compatible controller: nVidia Corporation G84M [Quadro FX 570M] (rev a1) (prog-if 00 [VGA controller])
Subsystem: Hewlett-Packard Company Device 30c5
Flags: bus master, fast devsel, latency 0, IRQ 16
Memory at e5000000 (32-bit, non-prefetchable) [size=16M]
Memory at d0000000 (64-bit, prefetchable) [size=256M]
Memory at e6000000 (64-bit, non-prefetchable) [size=32M]
I/O ports at 4000 [size=128]
Expansion ROM at <unassigned> [disabled]
Capabilities: <access denied>
Kernel driver in use: nouveau
Kernel modules: nvidiafb, nouveau

% uname -a
Linux jvasquez14 3.0-ARCH #1 SMP PREEMPT Tue Aug 16 08:44:20 CEST 2011 x86_64 Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz GenuineIntel GNU/Linux

% lsmod | 'grep' kvm
kvm_intel 53373 0
kvm 328912 1 kvm_intel
Comment by Javier (jevv) - Thursday, 18 August 2011, 20:28 GMT
I got a work around...

Someone mentioned sound was working for him, perhaps with a different driver? For me the ac97 and hda drivers just makes windows freeze and not boot. The other thing I was using was the tablet usb device. That's a good recommendation given that the tablet allows no need to grab the mouse, and one doesn't need to click to get into grab mode, neither use ctrl-alt to get out of grab mode. It makes qemu-kvm like any other application with regard of the mouse and pretty similar to what virtualbox supports with the guest additions... Bad thing the tablet is not working for me and it makes both the mouse and the keyboard useless, and due to that winodws gets useless...

So the work around for me is removing the following options:

-soundhw ac97
-usbdevice tablet

I can live without sound of course (actually I've read complains about sound consuming too much cpu), but I'm really missing the tablet. It's quiet a nice feature.

So what is broken seems to be sound support and tablet usbdevice support.

Just in case, from lspci on the host:

00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)
Subsystem: Hewlett-Packard Company Device 30c5
Flags: bus master, fast devsel, latency 0, IRQ 47
Memory at e8024000 (64-bit, non-prefetchable) [size=16K]
Capabilities: <access denied>
Kernel driver in use: HDA Intel
Kernel modules: snd-hda-intel

01:00.0 VGA compatible controller: nVidia Corporation G84M [Quadro FX 570M] (rev a1) (prog-if 00 [VGA controller])
Subsystem: Hewlett-Packard Company Device 30c5
Flags: bus master, fast devsel, latency 0, IRQ 16
Memory at e5000000 (32-bit, non-prefetchable) [size=16M]
Memory at d0000000 (64-bit, prefetchable) [size=256M]
Memory at e6000000 (64-bit, non-prefetchable) [size=32M]
I/O ports at 4000 [size=128]
Expansion ROM at <unassigned> [disabled]
Capabilities: <access denied>
Kernel driver in use: nouveau
Kernel modules: nvidiafb, nouveau

% uname -a
Linux jvasquez14 3.0-ARCH #1 SMP PREEMPT Tue Aug 16 08:44:20 CEST 2011 x86_64 Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz GenuineIntel GNU/Linux

% lsmod | 'grep' kvm
kvm_intel 53373 0
kvm 328912 1 kvm_intel
Comment by Tobias Powalowski (tpowa) - Friday, 19 August 2011, 06:09 GMT
Btw. you use a custom kernel, how should we reproduce things with unofficial packages?
Comment by Javier (jevv) - Friday, 19 August 2011, 15:50 GMT
Who mentioned a custom kernel? I don't use a custom kernel, I just use the plain x86-64 arch stock linux kernel. See the 3.0-ARCH from uname... I'm just too lazy to compile custom linux kernels (there was a time, like 10 years ago on debian, when I thought that was a good idea to avoid bloated kernels at that time), but it's been 10 years since I don't compile my linux kernels, :-)

But just to have it clear:

% pacman -Ss linux | 'grep' 'core\/linux'
core/linux 3.0.2-1 (base) [installed]
core/linux-api-headers 2.6.39.1-1 [installed]
core/linux-atm 2.5.1-2 [installed]
core/linux-docs 3.0.2-1
core/linux-firmware 20110727-1 [installed]
core/linux-headers 3.0.2-1

I just don't have the headers, but the rest is from stock... Then with that lunix kernel:

% uname -a
Linux jvasquez14 3.0-ARCH #1 SMP PREEMPT Tue Aug 16 08:44:20 CEST 2011 x86_64 Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz GenuineIntel GNU/Linux

And furthermore:

% ls /boot/
boot@ grub/ grub.old/ initramfs-linux-fallback.img initramfs-linux.img lost+found/ old/ vmlinuz-linux

As you can see, I have nothing more than the stock arch linux kernel...

I'm curious though. What makes you think I'm using a custom kenrel?

Javier.
Comment by Tobias Powalowski (tpowa) - Friday, 19 August 2011, 17:17 GMT
Sorry for the noise i thought jvasquez14 is your kernel built machine.
Comment by Javier (jevv) - Tuesday, 23 August 2011, 20:51 GMT
My work around doesn't work any more...

OK, new linux kernel and same qemu-kvm version but newer package:

% pacman -Ss qemu-kvm
extra/qemu-kvm 0.15.0-2 [installed]
Latest KVM QEMU is a generic and open source processor emulator which achieves a good emulation speed by using dynamic translation.

% pacman -Ss linux | 'grep' 'core/linux'
core/linux 3.0.3-1 (base) [installed]
core/linux-api-headers 3.0.1-1 [installed]
core/linux-atm 2.5.1-2 [installed]
core/linux-docs 3.0.3-1
core/linux-firmware 20110727-1 [installed]
core/linux-headers 3.0.3-1

And things got worse, :-(

Now I don't have mouse at all, and I can't get into grab mode any more. Meaning I can't use the keyboard either...

BTW, as someone mentioned using the virtio drivers for XP from RH, I'm using the same ones. The ISO version I used to install the drivers is:

virtio-win-1.1.16.iso

Not sure if there's a new one, but that one was working before latest update of kernel to 3.0.3-1 and qemu-kvm to 0.15.0-2.

Thanks,

Javier.
Comment by Javier (jevv) - Tuesday, 23 August 2011, 21:06 GMT
Ups, my work around is still working, :-)

I was trying removing the work around and didn't work, so I started experimenting, and forgot to remove usage of tablet...

So without tablet and sound things still work, :-)

Thanks,

Javier.

Loading...