diff options
author | volth <volth@webmaster.ms> | 2017-08-10 11:34:32 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-10 11:34:32 +0000 |
commit | 15351c478046935ae4a5504d492c7db1ad0fa31e (patch) | |
tree | f04eeb74d208d7b2dcdc2807449cbd20f888e097 /nixos/modules/virtualisation/libvirtd.nix | |
parent | 2dddc6dcf6711fb3c1264a520262d00f4a3e04da (diff) |
apply 'restartIfChanged = false' to all libvirtd services
Although it is quite safe to restart ```libvirtd``` when there are only ```qemu``` machines, in case if there are ```libvirt_lxc``` containers, a restart may result in putting the whole system into an odd state: the containers go on running but the new ```libvirtd``` daemons do not see them.
Diffstat (limited to 'nixos/modules/virtualisation/libvirtd.nix')
-rw-r--r-- | nixos/modules/virtualisation/libvirtd.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/virtualisation/libvirtd.nix b/nixos/modules/virtualisation/libvirtd.nix index 57178e05e5c6..ade0ba531cfa 100644 --- a/nixos/modules/virtualisation/libvirtd.nix +++ b/nixos/modules/virtualisation/libvirtd.nix @@ -168,8 +168,9 @@ in { serviceConfig = { Type = "notify"; KillMode = "process"; # when stopping, leave the VMs alone - Restart = "on-failure"; + Restart = "no"; }; + restartIfChanged = false; }; systemd.services.libvirt-guests = { @@ -187,6 +188,7 @@ in { systemd.services.virtlogd = { description = "Virtual machine log manager"; serviceConfig.ExecStart = "@${pkgs.libvirt}/sbin/virtlogd virtlogd"; + restartIfChanged = false; }; systemd.sockets.virtlockd = { @@ -198,6 +200,7 @@ in { systemd.services.virtlockd = { description = "Virtual machine lock manager"; serviceConfig.ExecStart = "@${pkgs.libvirt}/sbin/virtlockd virtlockd"; + restartIfChanged = false; }; }; } |