Red Hat Bugzilla – Bug 491065
[FEAT] QEMU: detect when ACPI power down command was received by the guest
Last modified: 2013-07-03 21:15:23 EDT
Description of problem:
We can detect that the guest read the register containing the power
button status. The register contains other random crap, so it won't be
100% reliable. Of course there's no guarantee the guest will be able to
complete its shutdown sequence, but at least we know there's a good
chance it started it.
This would allow us to know that the VM has responded to our request to shutdown and might be doing it (as opposed to stuck) and give it more time to shutdown. This is critical in cases Windows updates itself - it shuts itself down (closes all apps), then applies hotfixes - which may take few minutes. Killing it in the middle may be very harmful.
The detection should be output to the monitor, so the VDSM can make use of it and prolong the time it gives for a VM to shut down.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
We should create an async monitor event for it
We can't detect what guest is going to do reliably and we denied features based on that before. Heuristics are bad. What our current timeout for shutdown? Are you sure that guest will eventually shutdown if we'll wait long enough? Can we increase shutdown timeout from the gui?
Timeouts are bad. When Windows updates it will sometimes defer copying files to its shutdown sequence. If that happens shutdown can easily take many minutes.
If the guest doesn't shut down, let the user peek at it and see what's wrong.
(In reply to comment #5)
> Timeouts are bad. When Windows updates it will sometimes defer copying files
> to its shutdown sequence. If that happens shutdown can easily take many
Indeed - can take up to half an hour, for several tens of updates (had this last night - it may even revert the updates on failure!)
> If the guest doesn't shut down, let the user peek at it and see what's wrong.
So, shall we close it?
(In reply to comment #7)
> So, shall we close it?
If you read my initial description - all I'm asking is detection - which I'm fine with not being reliable. The decision to act upon it is up to the user. See the description of the scenario.
Tell user that host is not going down by itself and ask him if he want to power-off or he wants to check what happens. The detection you are asking for is not meaningful in most of the cases.