From 62cd5e4aa39d5bae32cfa24caf981d9a32d2b29b Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Tue, 11 Apr 2017 15:05:31 +0200 Subject: [PATCH] Fix ghost vmware vms Fix #975 --- gns3server/compute/vmware/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gns3server/compute/vmware/__init__.py b/gns3server/compute/vmware/__init__.py index db0591d5..4a4082c5 100644 --- a/gns3server/compute/vmware/__init__.py +++ b/gns3server/compute/vmware/__init__.py @@ -588,8 +588,9 @@ class VMware(BaseManager): for vm_settings in vm_entries.values(): if "displayname" in vm_settings and "config" in vm_settings: - log.debug('Found VM named "{}" with VMX file "{}"'.format(vm_settings["displayname"], vm_settings["config"])) - vmware_vms.append({"vmname": vm_settings["displayname"], "vmx_path": vm_settings["config"]}) + if os.path.exists(vm_settings["config"]): + log.debug('Found VM named "{}" with VMX file "{}"'.format(vm_settings["displayname"], vm_settings["config"])) + vmware_vms.append({"vmname": vm_settings["displayname"], "vmx_path": vm_settings["config"]}) return vmware_vms def _get_vms_from_directory(self, directory):