core: call xl destroy as root

In case the VM has PCI devices, it need to access sysfs (as root).
This commit is contained in:
Marek Marczykowski-Górecki 2014-02-16 11:15:06 +01:00
parent 17d2f94d8c
commit 6fece6347f

View File

@ -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: