mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-19 18:44:13 +00:00
nixos/libvirt-guests: add missing dependency on libvirtd.service
Ensure that VMs get properly suspended (or shutdown) instead of "pulling the plug" on them. Simulating shutdown with `sudo systemctl stop libvirtd.service libvirtd-ro.socket libvirtd-admin.socket libvirtd.socket libvirt-guests`: Before: systemd[1]: Stopping libvirt guests suspend/resume service... libvirt-guests.sh[1472512]: Can't connect to default. Skipping. systemd[1]: libvirt-guests.service: Deactivated successfully. After: systemd[1]: Stopping libvirt guests suspend/resume service... libvirt-guests.sh[1524073]: Running guests on default URI: libvirt-guests.sh[1524067]: ubuntu22.04 libvirt-guests.sh[1524100]: Suspending guests on default URI... libvirt-guests.sh[1524067]: Suspending ubuntu22.04: ... libvirt-guests.sh[1524067]: Suspending ubuntu22.04: 1.421 GiB libvirt-guests.sh[1524067]: Suspending ubuntu22.04: 2.618 GiB libvirt-guests.sh[1524067]: Suspending ubuntu22.04: done systemd[1]: libvirt-guests.service: Deactivated successfully.
This commit is contained in:
parent
93641a27b0
commit
cb4d104baf
@ -515,6 +515,8 @@ in
|
||||
|
||||
systemd.services.libvirt-guests = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
requires = [ "libvirtd.service" ];
|
||||
after = [ "libvirtd.service" ];
|
||||
path = with pkgs; [ coreutils gawk cfg.package ];
|
||||
restartIfChanged = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user