Fix ghost vmware vms

Fix #975
This commit is contained in:
Julien Duponchelle 2017-04-11 15:05:31 +02:00
parent 18835974fb
commit 62cd5e4aa3
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -588,6 +588,7 @@ class VMware(BaseManager):
for vm_settings in vm_entries.values():
if "displayname" in vm_settings and "config" in vm_settings:
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