1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 11:18:11 +00:00

Ignore inaccessible VirtualBox VMs.

This commit is contained in:
Jeremy 2014-11-24 11:15:30 -07:00
parent 09948a366f
commit 6ef614103e

View File

@ -751,7 +751,13 @@ class VirtualBox(IModule):
for line in result.splitlines(): for line in result.splitlines():
vmname, uuid = line.rsplit(' ', 1) vmname, uuid = line.rsplit(' ', 1)
vmname = vmname.strip('"') vmname = vmname.strip('"')
extra_data = self._execute_vboxmanage([vboxmanage_path, "getextradata", vmname, "GNS3/Clone"]).strip() if vmname == "<inaccessible>":
continue # ignore inaccessible VMs
try:
extra_data = self._execute_vboxmanage([vboxmanage_path, "getextradata", vmname, "GNS3/Clone"]).strip()
except VirtualBoxError as e:
self.send_custom_error(str(e))
return
if not extra_data == "Value: yes": if not extra_data == "Value: yes":
vms.append(vmname) vms.append(vmname)