Bug 834592 - libvirt-guest.service works backwards
libvirt-guest.service works backwards
Status: CLOSED DUPLICATE of bug 843836
Product: Fedora
Classification: Fedora
Component: libvirt (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Michal Privoznik
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-22 10:11 EDT by Simo Sorce
Modified: 2012-07-27 12:17 EDT (History)
14 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-27 12:17:30 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Simo Sorce 2012-06-22 10:11:24 EDT
I noticed my VM were killed at reboot and I was advice to enable libvirt-guest.service to have them saved automatically.

Unfortunately it seem this service is backwards or enabled from the wrong target.
'start' saved the VMs, 'stop' seem to do nothing.
This means that at shutdown VMs are still mercilessly killed.
Comment 1 Philippe Troin 2012-06-22 13:02:10 EDT
I'm running into the same problem as Simo.

After poring through the systemd logs, this is what I believe happens on my systems:

- libvirtd.service starts and keeps running
- libvirt-guests.service starts, see there is nothing to do (by default), then exits successfully.
- systemd seeing that the service has terminated successfully calls the stop target
- libvirt-guests.service tries to shutdown all the VMs, but fails as they are still in the BIOS or booting.
- libvirt-guests.service fails after 1 minute, but stays in the stopped,failed state.

Then, at real shutdown, the libvirt-guests stop action is not ran and the VMs are killed hard.

Adding:
  RemainAfterExit=yes
to the [Service] section of 
/lib/systemd/system/libvirt-guests.service
makes libvirt behave for me.

Phil.
Comment 2 Eric Blake 2012-07-27 12:17:30 EDT

*** This bug has been marked as a duplicate of bug 843836 ***

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