This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1269118 - QEMU seems to be ignoring the system_powerdown request.
QEMU seems to be ignoring the system_powerdown request.
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev (Show other bugs)
7.2
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Radim Krčmář
Virtualization Bugs
:
Depends On:
Blocks: 1267578
  Show dependency treegraph
 
Reported: 2015-10-06 07:45 EDT by Carlos Mestre González
Modified: 2015-10-14 08:56 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-14 08:56:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
vdsm, libvirt, qemu, ovirt engine -> starts at 2015-10-06 11:37:25,142 (361.28 KB, application/x-gzip)
2015-10-06 07:45 EDT, Carlos Mestre González
no flags Details

  None (edit)
Description Carlos Mestre González 2015-10-06 07:45:30 EDT
Created attachment 1080207 [details]
vdsm, libvirt, qemu, ovirt engine ->  starts at 2015-10-06 11:37:25,142

Description of problem:
Shuting down a vm (from ovirt via libvirt) seems to be ignored by qemu. All the requested info is in BZ1267578

Version-Release number of selected component (if applicable):
RHEL 7.2 (RHEL-7.2-20150904.0)
libvirt-1.2.17-9.el7.x86_64
libvirt-client-1.2.17-9.el7.x86_64
qemu-kvm-common-rhev-2.3.0-24.el7.x86_64
qemu-kvm-tools-rhev-2.3.0-24.el7.x86_64
qemu-kvm-rhev-2.3.0-24.el7.x86_64


How reproducible:
50%

Steps to Reproduce:
1. Create at vm and start it.
2. Shutdown the vm (sends system_powerdown to the vm)

Result: it never powers off.

Additional info:
Again please read BZ1267578 bug that is open to follow the discussion that make us open this bz (specifically comment 10). I'm attaching the logs here too from the run just in case.
Comment 2 Radim Krčmář 2015-10-07 15:36:48 EDT
The original bug has a Regression keyword while this one doesn't;
have you found out that shutdown always used to fail?  (Otherwise, which version of qemu-kvm-rhev still worked?)

In libvirt logs, QEMU acknowledges the request with

  {"timestamp": {"seconds": 1444120739, "microseconds": 158758}, "event": "POWERDOWN"}^M

It's an ACPI event, which could have been ignored by the guest ... what is the guest doing before and after receiving the event?  (Ideally with console output.)

Does something show up if you send the shutdown request while running `acpi_listen` in the guest?

Thanks.
Comment 3 Xiaoqing Wei 2015-10-08 02:42:55 EDT
Hi,

are you using Gnome ?
AFAIK, Gnome has a power policy, which controlling what action to be taken when a power event happened, eg: power button pressed.

if you are using Gnome, try

gsettings set org.gnome.settings-daemon.plugins.power button-power shutdown

in terminal, in GUI, after logged in.
this is a per user affect setting, tells Gnome to shutdown the OS when power button pressing.

Xiaoqing.
Comment 4 Carlos Mestre González 2015-10-14 08:56:36 EDT
Radim,

Thanks for the reply. I checked the /var/log/messages and did a few runs. Turns out in our automation the shut down signal was send when the vm was still loading the OS (ovirt shows the vm's status as UP) and the acpid module was not loaded. 

If the signal is send after the acpid is started:

Oct 14 11:02:03 localhost acpid: starting up
Oct 14 11:02:03 localhost acpid: 1 rule loaded
Oct 14 11:02:03 localhost acpid: waiting for events: event logging is off
Oct 14 11:02:04 localhost acpid: client connected from 1291[68:68]
Oct 14 11:02:04 localhost acpid: 1 client rule loaded

The vm shutdowns properly (from other test)

Oct 14 12:26:40 localhost acpid: exiting
Oct 14 12:26:41 localhost init: Disconnected from system bus
Oct 14 12:26:41 localhost kernel: Kernel logging (proc) stopped.

So I'm closing this issue since the power down request works fine.

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