From 6ef614103eb17571b98b2b7d694bc38aa59a3add Mon Sep 17 00:00:00 2001 From: Jeremy Date: Mon, 24 Nov 2014 11:15:30 -0700 Subject: [PATCH] Ignore inaccessible VirtualBox VMs. --- gns3server/modules/virtualbox/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gns3server/modules/virtualbox/__init__.py b/gns3server/modules/virtualbox/__init__.py index e32a301b..644c4d25 100644 --- a/gns3server/modules/virtualbox/__init__.py +++ b/gns3server/modules/virtualbox/__init__.py @@ -751,7 +751,13 @@ class VirtualBox(IModule): for line in result.splitlines(): vmname, uuid = line.rsplit(' ', 1) vmname = vmname.strip('"') - extra_data = self._execute_vboxmanage([vboxmanage_path, "getextradata", vmname, "GNS3/Clone"]).strip() + if vmname == "": + 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": vms.append(vmname)