fix vmware
This commit is contained in:
@@ -167,12 +167,12 @@ def _install_vm(vm_name, vms_dir, downloaded_file_name, original_vm_name="Ubuntu
|
|||||||
zip_ref.extractall(os.path.join(vms_dir, vm_name))
|
zip_ref.extractall(os.path.join(vms_dir, vm_name))
|
||||||
logger.info("Files have been successfully extracted to the directory: " + str(os.path.join(vms_dir, vm_name)))
|
logger.info("Files have been successfully extracted to the directory: " + str(os.path.join(vms_dir, vm_name)))
|
||||||
|
|
||||||
vm_path = os.path.join(vms_dir, vm_name, vm_name, vm_name + ".vmx")
|
vm_path = os.path.join(vms_dir, vm_name, vm_name + ".vmx")
|
||||||
|
|
||||||
# Execute the function to download and unzip the VM, and update the vm metadata
|
# Execute the function to download and unzip the VM, and update the vm metadata
|
||||||
if not os.path.exists(vm_path):
|
if not os.path.exists(vm_path):
|
||||||
__download_and_unzip_vm()
|
__download_and_unzip_vm()
|
||||||
_update_vm(os.path.join(vms_dir, vm_name, original_vm_name, original_vm_name + ".vmx"), vm_name)
|
_update_vm(os.path.join(vms_dir, vm_name, original_vm_name + ".vmx"), vm_name)
|
||||||
else:
|
else:
|
||||||
logger.info(f"Virtual machine exists: {vm_path}")
|
logger.info(f"Virtual machine exists: {vm_path}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user