qemu hangs on shutdown or reboot (XP guest)

Bug #498035 reported by Timothy Miller on 2009-12-18
This bug affects 3 people
Affects Status Importance Assigned to Milestone

Bug Description

When I shut down or reboot my Windows XP guest, about half the time, it hangs at the point where it says "Windows is shutting down...". At that point qemu is using 100% of one host CPU, about 85% user, 15% system. (Core 2 Quad 2.66GHz)

This is the command line I use to start qemu:

qemu-system-x86_64 -hda winxp.img -k en-us -m 2048 -smp 2 -vnc :3100 -usbdevice tablet -boot c -enable-kvm &

What version of qemu is this? Please try with 0.12.0-rc2

Timothy Miller (theosib) wrote :

I'm using version 0.11.1. Since Gentoo doesn't have an ebuild for 0.12.0, I'm filing a bug report with them so that they'll get up to date on this. (Also, I honestly don't know how to build an out-of-portage package for Gentoo without clobbering something or causing conflicts.)


Timothy Miller (theosib) wrote :

This bug is apparently not fixed. I'm using the Gentoo package "app-emulation/qemu-kvm-", and it too sometimes hangs up on reboot or shutdown.

Timothy Miller (theosib) wrote :

I asked on IRC, but I'm not getting much help there trying to diagnose this. Here's what I know:

- When Windows doesn't use ACPI to power off, you get a screen that tells you that you can power down now. I'm not getting that screen. It's still saying "Windows is shutting down..."
- The QEMU monitor responds, so it's not completely frozen up. Something's going wrong inside the VM.
- It doesn't usually hang up. This seems to happen mostly when I reboot after I install software or do something that requires heavy disk or network activity. I understand that this bug has in the past been associated with the audio driver, but I can't tell if any audio happened, because I'm using VNC.
- I haven't done anything to prevent Windows from using ACPI.

Timothy Miller (theosib) wrote :

The Gentoo devs have created an overlay I can use to install the git version of QEMU.

BTW, I've found a way to get the hang condition to occur very reliably. In the Windows XP guest, install the .Net framework and all the updates. Reboot. When the desktop comes up but before everything is 100% loaded, reboot. It's very likely to hang up at the end. Also, I don't observe it hanging on shutdown anymore. Just reboot.

Ok, will see if we can reproduce this.

Changed in qemu:
status: New → Triaged
importance: Undecided → High
Bryce Nesbitt (bryce2) wrote :

Also happens in Ubunto 10.04LTS Linux bnesbitt-desktop 2.6.32-24-generic #43-Ubuntu SMP Thu Sep 16 14:58:24 UTC 2010 x86_64 GNU/Linux

I've seen windows XP hanging on reboot/shutdown like this so many countless times I'd not bother with this at all. At least, does clean install of winXP shows the same behavour?

Claudio Matsuoka (cmatsuoka) wrote :

Did a clean XP install and could not reproduce with current git qemu-kvm.

Brian W. Neu (7elqb2n4t) wrote :

Confirming under Fedora 15, qemu 14.0

Very frustrating for clients using Microsoft RDP who just get a blank blue screen when it is stuck like this.

Confirming what? 0.14 version of qemu (there was no 14.0 version) is very old. Very frustrating that people just "confirm" bugs using old versions without trying current version which has a lot of changes within. I can confirm that this prob - winXP (or win7 for that matter) getting stuck on reboot/shutdown - which I faced too on a "semi-regular" basis has now gone, either because of some change in qemu, in configuration, or due to some patch on the windows side - I don't know, and will unlikely to know. I'm using 1.0.1 version currently.

Brian W. Neu (7elqb2n4t) wrote :

"Forgive me, El Guapo. I know that I, Jefe, do not have your superior intellect and education. But could it be that once again, you are angry at something else, and are looking to take it out on me?"

Eh, Tokarev, calm down. So I misplaced a period and a zero. So I haven't been compiling my own binaries to stay on top of the latest repo build. I also didn't see this bug report listed as "fixed" yet, which is reasonable to believe if it had been addressed in the current version.

I upgrade to F17 next Saturday and will have access to the 1.0.x RPMs w/o causing a compatibility nightmare under F15. I'll let you know if that fixes it.

So, is this issue still relevant with current qemu (which happens to be 2.1.0? I remember seeing hangs on reboot/halt like this before too, but on my side they're long gone, I don't observe these hangs anymore. Maybe this bugreport can be closed finally?

Changed in qemu:
status: Triaged → Incomplete
jclariana (jordiclariana) wrote :


I have the same problem, or at least seems related. I just opened an issue on https://sourceforge.net/p/kvm/bugs/555, if needed I can post here all the details too.

Edwin Drood (edwindrood) wrote :

My Two Cents.

I am using Xubuntu 14.04 recent install -- all updates.

I created a WIN7 x64 VM (fresh clean install) with most Windows updates -- nothing else.

Note: I use a script (command line startup) of "qemu-system-x86_64"

Inside Windows 7, I shutdown a few services that I thought I did not need (incl. POWER Service)

I had an occasional BSOD when shutting down. very quick, minor annoyance. Was able to slect start normally in Windows next boot -- only happened once every 10 or so times.

BUT I was able to shutdown quickly every time.

I discovered that I had to enable the POWER service to activate the virtual soundcard HW hda (to play audio).

since I have enabled the POWER service, I cannot shutdown normally. The "Shutting Down..." appears forever (or until occasional BSOD).

This does not cause any undue processor load and I am able to do a normal "quit" of the VM using telnet into the monitor. (issuing "quit" from the monitor is like yanking out the power-cord of the VM) I see no problems from doing this. Windows thinks it is shut-down clean enough.

It is possible that when I issue the "quit" in the monitor after about 10 seconds of shutdown, I may not get any more BSOD at all.

I have tried playing with the Windows Power configuration settings and have found nothing to solve the issue.

Other than this minor annoyance, everything is working great! (because it is running so well, I probably won't be running a trace or debugging the dump file in Windows. If anybody wants, I can share my startup script that launches the VM. I am not going to use any virt manager from the GUI.

Jackson Bryn (kazbloxmc) wrote :

Fresh install of XP and this doesn't happen....

pranith (bobby-prani) wrote :

Closing since it seems to be fixed in latest release.

Changed in qemu:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers