packer-plugin-vmware icon indicating copy to clipboard operation
packer-plugin-vmware copied to clipboard

vmware-iso Waiting for SSH to become available...Timeout

Open sfunkho opened this issue 1 year ago • 7 comments

I'm posting here even though it's a SSH timeout because I'm using a preseed file from the chef/bento project; which, have worked with other versions.

Version

packer 1.11.2 VMware Workstation Pro: 10.0.0 build-20800274

Environment

Windows 10: 22H2 19045.5131

Scenario

Trying to use the chef-bento to build a Debian 12 box with slight modifications of hard_disk size and using nvme using packer build as the README states.

I also had to update the debian-12-x86_64.pkrvars.hcl top reference 12.8.0 because 12.7.0 is no longer available.

Steps to Reproduce

cd <path/to>/bento packer init -upgrade ./packer_templates packer build --only=vmware-iso.vm --var-file=os_pkrvars\debian\debian-12-x86_64.pkrvars.hcl .\packer_templates Use VNC to see the state of preseed file install.

Expected Result

Expected to have a Debian 12 vmware VM built

Actual Result

The VM is created, boots, and processes the preceded file. In the VNC window there is just a bluescreen, and the windows command prompt shows '

==> vmware-iso.vm: Waiting for SSH to become available... ==> vmware-iso.vm: Timeout waiting for SSH. ==> vmware-iso.vm: Stopping virtual machine... ==> vmware-iso.vm: Deleting output directory...

sfunkho avatar Dec 03 '24 19:12 sfunkho

Hi @sfunkho,

SSH timeouts occur for a variety of reasons, mainly configuration errors, and occasionally because of a bug in Packer/SDK/Plugin code. Bento is a project we are aware of, but we do not maintain, as such if configuration is responsible for the timeouts, we cannot help on this front, and I would encourage you to report this to the project, as they will have more insights on what the templates are configured for.

In addition to this, I would suggest you share packer logs and a configuration so maintainers are able to trace what has gone wrong.

That said, assuming there is a chance of a packer-related bug, may I get more information on what happens, in which configuration it used to work, and what changed in between? If you're playing with VMWare workstation, there's a good chance you have some boot commands to type. These are often a bit time-sensitive, and a build that reliably works on a machine can fail on another, so if you changed hardware in between those tries, this could be a reason why that doesn't work anymore. It could also come from VMWare workstation for what it's worth, if you updated recently, maybe something changed which prevents you from booting properly. If all you see on VNC is a blue screen, I imagine the Debian installer failed and is stuck, but we cannot know what exactly occurred, and in this state it is expected for SSH not to be available as you're not booted into Debian, and sshd is not active.

In any case, this needs more information and investigation on your end before we can spend time digging into this. As I mentioned, I would suggest hitting the Bento project with a similar issue, possibly linking this one so we have a bridge between the two issues, in case we need to work together on a fix.

Thanks!

lbajolet-hashicorp avatar Dec 09 '24 20:12 lbajolet-hashicorp

@lbajolet-hashicorp - for transfer to packer-plugin-vmware.

tenthirtyam avatar Feb 28 '25 13:02 tenthirtyam

I am having this same problem with the Fusion 13 example. I connected to the vnc server and watched the install run its course. Then it rebooted and dropped into tty1 and just sits there.

Meanwhile packer sits at ==> vmware-iso.debian: Waiting for SSH to become available....

Any ideas what could be causing this?

corbinday avatar Apr 02 '25 17:04 corbinday

And ssh appears to be running...

Image

corbinday avatar Apr 02 '25 17:04 corbinday

It seems to have been an issue with VS Code's integrated terminal. Using the system terminal worked.

corbinday avatar Apr 02 '25 19:04 corbinday

@lbajolet-hashicorp can you transfer this one?

tenthirtyam avatar Apr 02 '25 19:04 tenthirtyam

Thanks, Lucas!

tenthirtyam avatar Apr 02 '25 21:04 tenthirtyam