59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
def cmd_start(options):
if options.stopped:
arg=""
if options.cdrom:
arg=" -cdrom "+options.cdrom
cmd=options.dir+"/start"+arg
os.system(cmd)
if options.gui:
uri = spiceurl(options)
os.system("remore-viewer $uri &")
elif not options.stopped:
print >>sys.stderr,"VM already running"
def cmd_stop(options):
print send_command(options.sock,'system_powerdown')
def cmd_reset(options):
|
>
|
|
>
>
>
|
|
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
def cmd_start(options):
if options.stopped:
arg=""
if options.cdrom:
arg=" -cdrom "+options.cdrom
cwd=os.getcwd()
os.chdir(options.dir)
os.system("./start%s" % arg)
os.chdir(cwd)
os.sleep(2)
options.sock = connect_vm(options.dir)
if options.gui:
uri = spiceurl(options)
os.system("remote-viewer %s &"%uri)
elif not options.stopped:
print >>sys.stderr,"VM already running"
def cmd_stop(options):
print send_command(options.sock,'system_powerdown')
def cmd_reset(options):
|