Bug 539365 - qemu's system_powerdown doesn't work with Windows XP
qemu's system_powerdown doesn't work with Windows XP
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: qemu (Show other bugs)
12
All Linux
low Severity medium
: ---
: ---
Assigned To: Justin M. Forbes
Fedora Extras Quality Assurance
: Reopened, Triaged
Depends On:
Blocks: F12VirtTarget
  Show dependency treegraph
 
Reported: 2009-11-19 18:03 EST by Jonathan Underwood
Modified: 2013-01-09 17:02 EST (History)
16 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-12-03 22:07:37 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jonathan Underwood 2009-11-19 18:03:07 EST
Description of problem:
I havea Windows XP guest instance, without ACPI support enabled in the guest (though I don't think that is relevant). The shutdown button in virt-manager and the shutdown command in virsh fail to shutdown the guest (in fact they don't seem to do anything). eg.

virsh # shutdown WindowsXP
Domain WindowsXP is being shutdown

... but nothing happens to the guest. In the end the only way to shutdown the guest is to kill the qemu process.

Version-Release number of selected component (if applicable):
# rpm -qa | grep virt
libvirt-client-0.7.1-15.fc12.x86_64
virt-manager-0.8.0-7.fc12.noarch
python-virtinst-0.500.0-5.fc12.noarch
libvirt-python-0.7.1-15.fc12.x86_64
libvirt-0.7.1-15.fc12.x86_64
# rpm -qa | grep qemu
qemu-system-sh4-0.11.0-11.fc12.x86_64
gpxe-roms-qemu-0.9.7-6.fc12.noarch
qemu-common-0.11.0-11.fc12.x86_64
qemu-user-0.11.0-11.fc12.x86_64
qemu-system-x86-0.11.0-11.fc12.x86_64
qemu-system-sparc-0.11.0-11.fc12.x86_64
qemu-system-mips-0.11.0-11.fc12.x86_64
qemu-kvm-0.11.0-11.fc12.x86_64
qemu-system-arm-0.11.0-11.fc12.x86_64
qemu-system-m68k-0.11.0-11.fc12.x86_64
qemu-kvm-tools-0.11.0-11.fc12.x86_64
qemu-img-0.11.0-11.fc12.x86_64
qemu-0.11.0-11.fc12.x86_64
qemu-system-cris-0.11.0-11.fc12.x86_64
qemu-system-ppc-0.11.0-11.fc12.x86_64
Comment 1 Chris Lalancette 2009-11-20 03:21:49 EST
(In reply to comment #0)
> Description of problem:
> I havea Windows XP guest instance, without ACPI support enabled in the guest
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is your problem.  The way that shutdown works for a kvm guest is to inject an ACPI button press event into the guest.  In order for that to work, you need to have ACPI enabled and working inside the guest.

Note that this isn't directly solvable via some sort of paravirt drivers, either.  While you could certainly have a paravirt driver that induced a shutdown inside the guest, you'd need to install the paravirt driver in the guest anyway.  Either one is a change to the guest, and if you are going to change the guest, you may as well use the standard mechanisms.

I'm going to close this as NOTABUG, since there's nothing that libvirt (or even qemu) can do in this case.  You need to configure your guest with ACPI.

Chris Lalancette
Comment 2 Jonathan Underwood 2009-11-20 05:12:35 EST
Hi Chris,

(In reply to comment #1)
> (In reply to comment #0)
> > Description of problem:
> > I havea Windows XP guest instance, without ACPI support enabled in the guest
>                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> This is your problem.  The way that shutdown works for a kvm guest is to inject
> an ACPI button press event into the guest.  In order for that to work, you need
> to have ACPI enabled and working inside the guest.
> 
> Note that this isn't directly solvable via some sort of paravirt drivers,
> either.  While you could certainly have a paravirt driver that induced a
> shutdown inside the guest, you'd need to install the paravirt driver in the
> guest anyway.  Either one is a change to the guest, and if you are going to
> change the guest, you may as well use the standard mechanisms.
> 

Right - I understand what you're saying, but the fact is that the shutdown button worked without ACPI with the F-11 virt stack, so this is a regression. Actually I think you may have missed my point, perhaps I should be clearer:

In F-11 I shutdown the guest from within the guest until I get the "It is now safe to shutdown your computer screen". At that point shutdown within virsh (or the shutdown button within virt-manager) would stop the guest process - the equivalent of powering off a real machine. This worked in F-11, doesn't work in F-12.


> I'm going to close this as NOTABUG, since there's nothing that libvirt (or even
> qemu) can do in this case.  

Well, I think it can, as it did in F11..
Comment 3 Chris Lalancette 2009-11-20 05:53:40 EST
(In reply to comment #2)
> Hi Chris,
> 
> (In reply to comment #1)
> > (In reply to comment #0)
> > > Description of problem:
> > > I havea Windows XP guest instance, without ACPI support enabled in the guest
> >                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > This is your problem.  The way that shutdown works for a kvm guest is to inject
> > an ACPI button press event into the guest.  In order for that to work, you need
> > to have ACPI enabled and working inside the guest.
> > 
> > Note that this isn't directly solvable via some sort of paravirt drivers,
> > either.  While you could certainly have a paravirt driver that induced a
> > shutdown inside the guest, you'd need to install the paravirt driver in the
> > guest anyway.  Either one is a change to the guest, and if you are going to
> > change the guest, you may as well use the standard mechanisms.
> > 
> 
> Right - I understand what you're saying, but the fact is that the shutdown
> button worked without ACPI with the F-11 virt stack, so this is a regression.
> Actually I think you may have missed my point, perhaps I should be clearer:
> 
> In F-11 I shutdown the guest from within the guest until I get the "It is now
> safe to shutdown your computer screen". At that point shutdown within virsh (or
> the shutdown button within virt-manager) would stop the guest process - the
> equivalent of powering off a real machine. This worked in F-11, doesn't work in
> F-12.

Ah, this is a different story.  I didn't understand this.  It does seem like a change in behavior, although I can't imagine where.  As far as I know, virsh shutdown has always just injected an ACPI event, so there wouldn't be much change there.  It's possible that qemu inadvertently changed it's behavior, though.

It's also possible that this was a deliberate change in behavior.  You could argue that once the guest is shutdown (without ACPI), the only reasonable thing to do is to physically poweroff the machine, which is essentially what "virsh destroy" does.

I'll re-open it for the time being so others can look at it, but I'm not at all certain it's something we can/should fix.

Chris Lalancette
Comment 4 Mark McLoughlin 2009-11-20 14:09:54 EST
In F-12, we enabled ACPI for XP guests:

  https://www.redhat.com/archives/et-mgmt-tools/2009-July/msg00002.html

Does your guest have <acpi/> in its <features/> section? Does adding it help?

libvirt merely sends a 'system_powerdown' monitor command to qemu when you do 'virsh shutdown'

AFAICS, the behaviour with an XP guest is:

  - on F-11, there's no <acpi/> so 'virsh shutdown' would cause the guest
    to exit immediately

  - on F-12, there is <acpi/>, but 'virsh shutdown' does nothing

Gleb, is it expected that 'system_powerdown' does nothing with XP guests, even with ACPI enabled for the VM?
Comment 5 Jonathan Underwood 2009-11-20 14:33:24 EST
(In reply to comment #4)
> In F-12, we enabled ACPI for XP guests:
> 
>   https://www.redhat.com/archives/et-mgmt-tools/2009-July/msg00002.html
> 
> Does your guest have <acpi/> in its <features/> section? Does adding it help?
> 

Yes, it does have it:

<features>
  <acpi/>
  <apic/>
  <pae/>
</features>

So I tried commenting out the <acpi/> line, but there was no change in behaviour from what I describe above wrt shutdown, surprisingly.

> libvirt merely sends a 'system_powerdown' monitor command to qemu when you do
> 'virsh shutdown'
> 
> AFAICS, the behaviour with an XP guest is:
> 
>   - on F-11, there's no <acpi/> so 'virsh shutdown' would cause the guest
>     to exit immediately
> 
>   - on F-12, there is <acpi/>, but 'virsh shutdown' does nothing
> 
> Gleb, is it expected that 'system_powerdown' does nothing with XP guests, even
> with ACPI enabled for the VM?  

Note that I created a new Windows XP VM (from the same install media) WITH ACPI enabled in the guest, and the shutdwon command and button function exactly as they should do. I think therefore the only problem is when the guest doesn't have ACPI enabled.
Comment 6 Mark McLoughlin 2009-11-20 14:42:36 EST
Hmm, I wonder is the issue that the guest needs to have ACPI enabled when it's originally installed? i.e. just enabling it post-install doesn't help?
Comment 7 Dor Laor 2009-11-22 02:56:46 EST
Default XP does support acpi. Only special installation of 'standard HAL' might cause issues.

It might be an issue with handling the pm irq.
Comment 8 Fedora Admin XMLRPC Client 2010-03-09 12:19:20 EST
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 9 Bug Zapper 2010-11-04 01:59:24 EDT
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 10 Bug Zapper 2010-12-03 22:07:37 EST
Fedora 12 changed to end-of-life (EOL) status on 2010-12-02. Fedora 12 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

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