From 15351c478046935ae4a5504d492c7db1ad0fa31e Mon Sep 17 00:00:00 2001 From: volth Date: Thu, 10 Aug 2017 11:34:32 +0000 Subject: [PATCH] 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. --- nixos/modules/virtualisation/libvirtd.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; }; }; }