mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 17:28:08 +00:00
Tweak how VMware VMs are found with fallback to search in the default location for VMs.
This commit is contained in:
parent
1f4b87ae9c
commit
98b201e9e5
@ -680,13 +680,14 @@ class VMware(BaseManager):
|
||||
|
||||
# check for the right VMware version
|
||||
yield from self.check_vmware_version()
|
||||
|
||||
vmware_vms = []
|
||||
inventory_path = self.get_vmware_inventory_path()
|
||||
if os.path.exists(inventory_path) and self.host_type != "player":
|
||||
# inventory may exist for VMware player if VMware workstation has been previously installed
|
||||
return self._get_vms_from_inventory(inventory_path)
|
||||
else:
|
||||
# VMware player has no inventory file, let's search the default location for VMs
|
||||
vmware_vms = self._get_vms_from_inventory(inventory_path)
|
||||
if not vmware_vms:
|
||||
# Backup method or for VMware player which has no inventory file
|
||||
# Let's search the default location for VMs
|
||||
vmware_preferences_path = self.get_vmware_preferences_path()
|
||||
default_vm_path = self.get_vmware_default_vm_path()
|
||||
pairs = {}
|
||||
|
Loading…
Reference in New Issue
Block a user