dom0: move shutdown to qvm-core

This commit is contained in:
Marek Marczykowski 2011-10-14 11:59:33 +02:00
parent dfd0f73e30
commit abcd6416fc
2 changed files with 8 additions and 1 deletions

View File

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

View File

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