mirror of
https://github.com/gryf/boxpy.git
synced 2025-12-19 05:30:18 +01:00
Fix for rebuild command and calling vmdestroy function.
This commit is contained in:
7
box.py
7
box.py
@@ -1227,7 +1227,12 @@ def vmcreate(args, conf=None):
|
|||||||
|
|
||||||
|
|
||||||
def vmdestroy(args):
|
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)
|
vbox = VBoxManage(name)
|
||||||
if not vbox.get_vm_info():
|
if not vbox.get_vm_info():
|
||||||
LOG.fatal(f'Cannot remove VM "{name}" - it doesn\'t exists.')
|
LOG.fatal(f'Cannot remove VM "{name}" - it doesn\'t exists.')
|
||||||
|
|||||||
Reference in New Issue
Block a user