diff --git a/dom0/qvm-core/qubes.py b/dom0/qvm-core/qubes.py index 6b63f9aa..b50546a6 100755 --- a/dom0/qvm-core/qubes.py +++ b/dom0/qvm-core/qubes.py @@ -1082,6 +1082,13 @@ class QubesVm(object): return xid + def shutdown(self): + if dry_run: + return + + subprocess.call (['/usr/sbin/xl', 'shutdown', self.name]) + #xc.domain_destroy(self.get_xid()) + def force_shutdown(self): if dry_run: return diff --git a/dom0/qvm-tools/qvm-run b/dom0/qvm-tools/qvm-run index 2777b9ee..7c69bc95 100755 --- a/dom0/qvm-tools/qvm-run +++ b/dom0/qvm-tools/qvm-run @@ -80,7 +80,7 @@ def vm_run_cmd(vm, cmd, options): if options.shutdown: if options.verbose: print >> sys.stderr, "Shutting down VM: '{0}'...".format(vm.name) - subprocess.call (["/usr/sbin/xl", "shutdown", vm.name]) + vm.shutdown() return if options.pause: