Overview of the Issue
I've been using Packer / vsphere-iso for a long time without any issues but somehow it broke a few months ago and now I can't build new images:
errored after 5 minutes 30 seconds: POST "/sdk": 502 Proxy Error
Notes:
- It used to work but it suddenly broke a few months ago (summer 2025).
- I suspect this is related to vSphere 8.x. It worked well under vSphere 7.x.x.
- I have no idea of the content of the POST thats trigger the 502 Error.
- Guest installation runs fine but is interrupted by the shutdown.
- Reproducible on multiple vSphere clusters.
Reproduction Steps
Run "packer build ." with the provided demo project bellow, connect to a 8.0.x vSphere.
Packer Version
Packer v1.14.2 (Linux amd64)
Plugin Version and Builders
packer-plugin-vsphere_v2.0.0_x5.0_linux_amd64.
Please select the builder.
VMware vSphere Version
8.0.3
Guest Operating System
- Windows Server Datacenter 2025
- Windows Server Datacenter 2022
Simplified Packer Buildfile
source "vsphere-iso" "datacenter-efi" {
vm_name = "windows-server-2025-datacenter-efi-packer"
CPUs = 2
RAM = 8192
disk_controller_type = ["lsilogic-sas"]
guest_os_type = "windows2022srvNext_64Guest"
firmware = "efi"
iso_url = # private url to iso
iso_checksum = # iso checksum
boot_wait = "2s"
boot_command = ["<spacebar>"]
network_adapters {
network = var.vcenter_network
network_card = "vmxnet3"
}
storage {
disk_size = 32768
disk_thin_provisioned = true
}
cdrom_type = "sata"
remove_cdrom = true
floppy_content = {
"autounattend.xml" = templatefile("./autounattend_efi.xml.pkrtpl")
}
}
Omitted parameters: host,password,username,vcenter_server,datacenter,datastore,cluster, winrm communicator.
Operating System and Environment Details
Launched build from:
Log Fragments and crash.log Files
Build results:
[...]
==> vsphere-iso.datacenter-efi: Powering on virtual machine...
==> vsphere-iso.datacenter-efi: Waiting 2s for boot...
==> vsphere-iso.datacenter-efi: Typing boot command...
==> vsphere-iso.datacenter-efi: Waiting for IP...
==> vsphere-iso.datacenter-efi: Clearing boot order...
==> vsphere-iso.datacenter-efi: Powering off virtual machine...
==> vsphere-iso.datacenter-efi: Deleting floppy image...
==> vsphere-iso.datacenter-efi: Destroying VM...
==> vsphere-iso.datacenter-efi: Closing sessions...
Build 'vsphere-iso.datacenter-efi' errored after 5 minutes 28 seconds: POST "/sdk": 502 Proxy Error
==> Wait completed after 5 minutes 28 seconds
==> Some builds didn't complete successfully and had errors:
--> vsphere-iso.datacenter-efi: POST "/sdk": 502 Proxy Error
==> Builds finished but no artifacts were created.
This is the log without "PACKER_LOG=1" because the later is more verbose but does not provides more info about that 502 error.
Overview of the Issue
I've been using Packer / vsphere-iso for a long time without any issues but somehow it broke a few months ago and now I can't build new images:
Notes:
Reproduction Steps
Run "packer build ." with the provided demo project bellow, connect to a 8.0.x vSphere.
Packer Version
Packer v1.14.2 (Linux amd64)
Plugin Version and Builders
packer-plugin-vsphere_v2.0.0_x5.0_linux_amd64.Please select the builder.
vsphere-isovsphere-cloneVMware vSphere Version
8.0.3
Guest Operating System
Simplified Packer Buildfile
Omitted parameters: host,password,username,vcenter_server,datacenter,datastore,cluster, winrm communicator.
Operating System and Environment Details
Launched build from:
Log Fragments and
crash.logFilesBuild results:
This is the log without "PACKER_LOG=1" because the later is more verbose but does not provides more info about that 502 error.