Overview
Comment: | Make vws list --stated distinguish between stopped and hyberated (by vws save) machines |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
a51866b638cfc6209625eac79ff7ffe8 |
User & Date: | vitus on 2019-10-03 07:54:53 |
Other Links: | manifest | tags |
Context
2019-10-03
| ||
10:26 | Fixed random mac generation for python3 check-in: 7eafff75ba user: vitus tags: trunk | |
07:54 | Make vws list --stated distinguish between stopped and hyberated (by vws save) machines check-in: a51866b638 user: vitus tags: trunk | |
07:27 | More info on bridge configuration check-in: 46b8264cac user: vitus tags: trunk | |
Changes
Modified vws from [d549c75576] to [0aa3cad620].
︙ | |||
209 210 211 212 213 214 215 | 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | - + | """ Checks if there is snapshot of running vm which should be restored Returns either id of this snapshot or None """ nxt = 0 with os.popen("qemu-img info \"%s\"" % |
︙ | |||
281 282 283 284 285 286 287 | 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 | - + | if options.gui: os.system((config.get('tools', 'viewer') + "&") % uri) elif not options.stopped: print("VM already running use uri %s" % uri, file=sys.stderr) def cmd_stop(options): """ vws stop """ |
︙ | |||
328 329 330 331 332 333 334 | 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 | + - + | def cmd_save(options): """ vws save """ answer = send_command(options.sock, 'savevm') if re.search("Error", answer): print(answer, file=sys.stderr) sys.exit(1) else: options.hard = True |
︙ | |||
425 426 427 428 429 430 431 | 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 | + + + + - + - + - + | print(answer) def make_vm_listing(vmname, dirname, vmtype): """ makes dict with vm properties for short index """ f = {"name":vmname, "type":vmtype} sock = connect_vm(dirname) if sock is None: if check_for_snapshot(dirname): f['state'] = "sleeping" else: f['state'] = 'stopped ' |
︙ |