从 vmx 文件构建的 Packer 错误 - "file was not found"
Packer error with build from vmx file - "file was not found"
我有一个我想不通的问题。我正在尝试从 Packer (Hashicorp) 克隆我的第一个虚拟机,这是我的 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 等...以继续克隆
我有一个我想不通的问题。我正在尝试从 Packer (Hashicorp) 克隆我的第一个虚拟机,这是我的 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 等...以继续克隆