Hello, I am creating ubuntu 20.04 LTS images using packer,
I stuck with ==> ubuntu-20.04.2.0-desktop-amd64: Waiting for SSH to become available…
So far I have tried with multiple attempts at the different time settings in the ssh_wait_timeout such as 30min, 45min, 1hrs, and 2hr but still, I am getting the same issue.
==> virtualbox-iso: Waiting for SSH to become available…
==> virtualbox-iso: Timeout waiting for SSH.
==> virtualbox-iso: Timeout waiting for SSH.
==> virtualbox-iso: Step “StepConnect” failed
==> virtualbox-iso: [c] Clean up and exit, [a] abort without cleanup, or [r] retry step (build may fail even if retry succeeds)?
May I know what is wrong with my preseed.cfg/ json file…? how to address the above error…?
Dump question first: is the openssh-server package installed in the desktop version? To be sure I would trigger the installation during the preseed/ autoinstaller phase.
@Wolfsrudel thanks for your response. I have added d-i pkgsel/include string openssh-server build-essential in the preseed.cfg still I am getting the same ssh timeout and hang error. But still, I am debugging the issue.
Do you have any suggestions to use the publicly available templates and preseed.cfg file that’s work for the Ubuntu 20.04 LTS desktop image creation.
set the env var PACKER_LOG=1 so you can get verbose logs.
set “headless:false” and actually connect to see what’s going on from the vm console. That’ll help you debug much faster than just guessing and waiting. Virtualbox uses rdp to connect.
Having the same issue. I’m using autoinstall cloud init config. After the first reboot packer does nothing. Port is forwarded to ssh, it’s possible to login using ssh, but it’s just waiting for a timeout. It happens when only i need it to login, when provisioner “ansible” {} is set. In a different configuration it works fine(without provisioners). It just logins and shutdowns the machine.
@ajaymas as far as I know, Ubuntu 20.04 doesn’t support debian-installer anymore, if I understand correctly. I’ve heard that only the legacy versions do. I think the point now is to use cloud-init directly.
@admssa how can people guess what’s happening if you don’t provide really anything related to your setup? You’re not even mentioning the second minor version etc.