I'm attempting to create a new Ubuntu 16.04.5 VM. It's creating the VM fine as I can log into it until SSH timeouts and the VM is taken down and destroyed.
In this specific case, my goal is a VM with no new user, I know the root password and it gets assigned a static IP. This is to replicate what I get from my VPS provider and will enable me to test my Ansible scripts appropriately.
I'm noting in the preseed.cfg file, the assigning of static IP, root password and the late_command string that enables remote root login (my Ansible script turns this off when it runs).
Here is the reoccurring errors in my log file:
2019/01/24 07:45:52 packer.exe: 2019/01/24 07:45:52 [INFO] Attempting SSH connection...
2019/01/24 07:45:52 packer.exe: 2019/01/24 07:45:52 [DEBUG] reconnecting to TCP connection for SSH
2019/01/24 07:45:52 packer.exe: 2019/01/24 07:45:52 [DEBUG] handshaking with SSH
2019/01/24 07:45:55 packer.exe: 2019/01/24 07:45:55 [DEBUG] SSH handshake err: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain
2019/01/24 07:45:55 packer.exe: 2019/01/24 07:45:55 [DEBUG] Detected authentication error. Increasing handshake attempts.