From 6fece6347f99331ee62b71f7ef4d211848a44eea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sun, 16 Feb 2014 11:15:06 +0100 Subject: [PATCH] core: call xl destroy as root In case the VM has PCI devices, it need to access sysfs (as root). --- core-modules/000QubesVm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core-modules/000QubesVm.py b/core-modules/000QubesVm.py index 352b9400..fe175fdb 100644 --- a/core-modules/000QubesVm.py +++ b/core-modules/000QubesVm.py @@ -1619,7 +1619,8 @@ class QubesVm(object): if not self.is_running() and not self.is_paused(): raise QubesException ("VM already stopped!") - subprocess.call (['/usr/sbin/xl', 'destroy', str(xid) if xid is not None else self.name]) + subprocess.call(['sudo', '/usr/sbin/xl', 'destroy', + str(xid) if xid is not None else self.name]) def suspend(self): if dry_run: