Hi folks, trying to figure out packer to build ubuntu server templates using packer in vSphere and can’t get one done.
I’m following closely the guide by Sam Gabrail: https://gitlab.com/public-projects3/infrastructure-vmware-public/vmware-packer-ubuntu22.04-public and with the only main modification to the hcl files was to modify the iso file details for 22.10. Tried 22.04.2 also but faced the same problem.
I’m running this from MacOS (installed using brew version 1.8.7) and running this againist vSphere Server v8 and ESXi v8
Packer can create the template successfully and boots the VM but then gets stuck at:
==> vsphere-iso.linux--server: Waiting for SSH to become available…
Looking at the VM Console, it seems to crash:
I can ping the DHCP assigned IP, SSH is up and running but seemlingly the ubuntu/ubuntu user I’m expecting to be created based on the hcl files was never created.
I manually created the user ubuntu at the console, the script proceeded but failed shortly after:
==> vsphere-iso.linux--server: Connected to SSH!
==> vsphere-iso.linux--server: Provisioning with shell script: ./scripts/setup_2204_withDocker.sh
==> vsphere-iso.linux--server: [sudo] password for : is not in the sudoers file.
==> vsphere-iso.linux--server: Script exited with non-zero exit status: 1. Allowed exit codes are: [0]
Doesn’t solve what’s really going on obviously.
Here’s the referenced crash dump file:
1685927210.490120411.install_fail.crash.txt (1.0 MB)
Any help really appreciated to figure this out!