Meanwhile packer is waiting for ssh and eventually times out.
$ packer build -var-file="../credentials.pkr.hcl" ./ubuntu-server-jammy.pkr.hcl
ubuntu-server-jammy.proxmox-iso.ubuntu-server-jammy: output will be in this color.
==> ubuntu-server-jammy.proxmox-iso.ubuntu-server-jammy: Creating VM
==> ubuntu-server-jammy.proxmox-iso.ubuntu-server-jammy: Starting VM
==> ubuntu-server-jammy.proxmox-iso.ubuntu-server-jammy: Starting HTTP server on port 8567
==> ubuntu-server-jammy.proxmox-iso.ubuntu-server-jammy: Waiting 5s for boot
==> ubuntu-server-jammy.proxmox-iso.ubuntu-server-jammy: Typing the boot command
==> ubuntu-server-jammy.proxmox-iso.ubuntu-server-jammy: Waiting for SSH to become available...
I managed to find someone with the same issue on Christian’s Github.
It looks like they solved it by running from a different vm already in Proxmox instead of locally.
I’m trying to run this from WSL on Windows.
Is there a way to make it work from local or should I abandon that idea and just run it from a vm like the other guy did?
Proxmox will request http://<windows-pc-ip>:8336/user-data and the port forwarding will serve that from http://<WSL2-ip>:8336/user-data
In addition <windows-pc-ip>:8336 needs to be open in the Windows firewall
You can curl http://<windows-pc-ip>:8336/user-data the same URL from Proxmox host whilst Packer is waiting to check that Packer is correctly serving the file. If the build still is not obtaining the file, then you may have to solve step 2. I introduced this before autoinstall part of the boot_command
"ip=::::::dhcp::: ", # autoconf=dhcp
and with that, the Packer built VM was able to access other devices on the network, obtain the user-data file and finally after weeks of soul destroying frustration, it was possible to see things take shape. It was then only a short amount of time to get Mantic building as well.
I’m not entirely sure why, but the following also helped get better consistency in builds working