1
0
mirror of https://github.com/gryf/boxpy.git synced 2025-12-18 13:00:17 +01:00

Fix for rebuild command and calling vmdestroy function.

This commit is contained in:
2021-11-04 09:26:29 +01:00
parent 353d848072
commit 0093e32b74

7
box.py
View File

@@ -1227,7 +1227,12 @@ def vmcreate(args, conf=None):
def vmdestroy(args):
for name in args.name:
if isinstance(args.name, list):
vm_names = args.name
else:
vm_names = [args.name]
for name in vm_names:
vbox = VBoxManage(name)
if not vbox.get_vm_info():
LOG.fatal(f'Cannot remove VM "{name}" - it doesn\'t exists.')