From 9bfcb72722170f7410cce1e4a2ab15ee3df11c89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sun, 29 Mar 2015 23:48:10 +0200 Subject: [PATCH] core: fix setting the VM autostart (#925) This is actually workaround for systemd bug reported here: https://bugzilla.redhat.com/show_bug.cgi?id=1181922 Closes qubesos/qubes-issues#925 --- core-modules/000QubesVm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core-modules/000QubesVm.py b/core-modules/000QubesVm.py index 05379b7f..341c4c61 100644 --- a/core-modules/000QubesVm.py +++ b/core-modules/000QubesVm.py @@ -607,7 +607,9 @@ class QubesVm(object): @autostart.setter def autostart(self, value): if value: - retcode = subprocess.call(["sudo", "systemctl", "enable", "qubes-vm@%s.service" % self.name]) + retcode = subprocess.call(["sudo", "ln", "-sf", + "/usr/lib/systemd/system/qubes-vm@.service", + "/etc/systemd/system/multi-user.target.wants/qubes-vm@%s.service" % self.name]) else: retcode = subprocess.call(["sudo", "systemctl", "disable", "qubes-vm@%s.service" % self.name]) if retcode != 0: