filenotfoundexception - Packer 从 vmx 文件构建时出错 - “找不到文件”

我有一个我无法弄清楚的问题。我正在尝试从 Packer (Hashicorp) 制作我的第一个 VM 克隆,这是我的 HCL:

source "vmware-vmx" "basic-example" { 
 source_path = "D:/HashiCorp/Packer1.8.0/Project/WindowsServer2022.vmx"
 vm_name = "Test1"
 communicator = "winrm"
 winrm_host = "redteam"
 winrm_username = "admin"
 winrm_password = "Disc0very"
 shutdown_command = "shutdown /s"
build {
  sources = ["sources.vmware-vmx.basic-example"]


D:\HashiCorp\Packer1.8.0\Project>packer build packer_test_win2022CARL.pkr.hcl
vmware-vmx.basic-example: output will be in this color.

==> vmware-vmx.basic-example: Configuring output and export directories...
==> vmware-vmx.basic-example: Creating required virtual machine disks
==> vmware-vmx.basic-example: Cloning source VM...
==> vmware-vmx.basic-example: Deleting output directory...
Build 'vmware-vmx.basic-example' errored after 521 milliseconds 605 microseconds: VMware error: Error: A file was not found

==> Wait completed after 521 milliseconds 605 microseconds

==> Some builds didn't complete successfully and had errors:
--> vmware-vmx.basic-example: VMware error: Error: A file was not found

==> Builds finished but no artifacts were created.


已解决,指向 VMX 文件不够,VMware 需要其他文件,例如 .vmdk、.vmxf 等...才能继续克隆