166
167
168
169
170
171
172
173
174
175
176
177
178
179
|
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
+
+
+
|
def cmd_spiceuri(options):
""" vws spiceuri """
print spiceurl(options.sock)
def cmd_start(options):
""" vws start """
if not "DISPLAY" in os.environ:
# If cannot start GUI just don't do it.
options.gui = False
if options.stopped:
arg = ""
if options.cdrom:
arg = " -cdrom " + os.path.abspath(options.cdrom[0])
if options.snapshot:
arg = arg+" -snapshot"
if options.args:
|
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
|
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
|
-
-
+
+
-
+
|
if options.snapshot or options.args:
print >>sys.stderr, ("Cannot change qemu options. " +
"VM is already running")
if options.cdrom:
options.file = options.cdrom[0]
options.id = None
cmd_cdrom(options)
if options.gui:
uri = spiceurl(options.sock)
uri = spiceurl(options.sock)
if options.gui:
os.system((config.get('tools', 'viewer') + "&") % uri)
elif not options.stopped:
print >>sys.stderr, "VM already running"
print >>sys.stderr, "VM already running use uri %s" % uri
def cmd_stop(options):
""" vws stop """
if snapshot_mode(options.sock) or options.hard:
try:
send_command(options.sock, 'quit')
except IOError as e:
|