1
0
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:
2023-04-02 10:05:06 +02:00
parent 1f1084f294
commit 10543cb506

7
box.py
View File

@@ -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