add untested code to allow resuming of a hibernated VM
This commit is contained in:
@@ -39,19 +39,24 @@ def vmm_start(args):
|
||||
print("VM {0} is already running!".format(args.vmid))
|
||||
return
|
||||
|
||||
#TODO: pass ignore hibernation file flag
|
||||
print('Starting VM {0.vmid}.'.format(args))
|
||||
fullpath_manager = os.path.realpath(sys.argv[0])
|
||||
helper.startVM(args.vmid,fullpath_manager)
|
||||
|
||||
if (args.i is not None and args.i >= 1):
|
||||
helper.startVM(args.vmid, fullpath_manager, True)
|
||||
else:
|
||||
helper.startVM(args.vmid, fullpath_manager)
|
||||
#print("Successfully started: " + ("yes" if helper.process_running(args.vmid) else "no"))
|
||||
|
||||
def vmm_shutdown(args):
|
||||
print('Shutting down all VMs.')
|
||||
timeout = SHUTDOWN_TIMEOUT if args.t is None or args.t < 0 else args.t
|
||||
stCallback = lambda vmid, st : print("VM {0}: {1}".format(vmid, stopStatusToMessage[st]))
|
||||
|
||||
helper.shutdownVMs(timeout, args.s is None or args.s < 1, statusCallback=stCallback)
|
||||
|
||||
def vmm_hibernate(args):
|
||||
print('Hibernating all VMs.')
|
||||
#TODO: implement ;)
|
||||
|
||||
def vmm_stop(args):
|
||||
|
||||
Reference in New Issue
Block a user