Ubuntu cloud-init - Packer SSH Connecting to Installer

Hey all,

Just started using Packer today, and I have it building and seeding an Ubuntu 20.04 box with cloud-init using virtualbox-iso. However, all the reference material use SSH which is supposed to run and shutdown the machine when it’s succesful. My issue is that packer is trying to connect to the installers SSH server during the cloud-init process. Neither ssh_wait_timeout, or ssh_timeout seem to account for this. Am I missing something really obvious, along the lines of “ssh_delay”

Cheers

Never mind, I have found this: Packer fails to build Vagrant box for Ubuntu 20.04 · Issue #9115 · hashicorp/packer · GitHub

This suggests either not using SSH, or changing the handshake limit to a high number to account for failures.

I use a ssh_timeout of about 15 minutes. It’s somewhat random, normally it reboots after 5 minutes, but I just use a number that covers it, just to be sure.