mirror of
https://github.com/gryf/boxpy.git
synced 2025-12-18 21:10:17 +01:00
Don't create vm till it's still there during rebuild
This commit is contained in:
7
box.py
7
box.py
@@ -1445,6 +1445,13 @@ def vmrebuild(args):
|
|||||||
conf.disk_size = vbox.get_media_size(disk_path)
|
conf.disk_size = vbox.get_media_size(disk_path)
|
||||||
|
|
||||||
vmdestroy(args)
|
vmdestroy(args)
|
||||||
|
|
||||||
|
# Wait till VM is gone
|
||||||
|
while True:
|
||||||
|
vbox = VBoxManage(args.name)
|
||||||
|
if not vbox.get_vm_info():
|
||||||
|
break
|
||||||
|
|
||||||
vmcreate(args, conf)
|
vmcreate(args, conf)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user