Packer hangs at - Waiting for SSH to become available

Am trying to build a virtual box for Bahmni 0.92 ,

here is my template_rendered.json file , i pointed packer to download a centos7 image in the json file ,with an apropriate checksum text , but whenever i run packer , it hangs at Waiting for SSH to become available

ful log details here

$ packer build template_rendered.json
virtualbox-iso: output will be in this color.

==> virtualbox-iso: Retrieving Guest additions
==> virtualbox-iso: Trying D:\Virtuak box/VBoxGuestAdditions.iso
==> virtualbox-iso: Trying file://D:/Virtuak%20box/VBoxGuestAdditions.iso
==> virtualbox-iso: file://D:/Virtuak%20box/VBoxGuestAdditions.iso => D:/Virtuak box/VBoxGuestAdditions.iso
==> virtualbox-iso: Retrieving ISO
==> virtualbox-iso: Trying iso/CentOS-7-x86_64-Minimal-1908.iso
==> virtualbox-iso: Trying iso/CentOS-7-x86_64-Minimal-1908.iso?checksum=sha256%3A9a2c47d97b9975452f7d582264e9fc16d108ed8252ac6816239a3b58cef5c53d
==> virtualbox-iso: iso/CentOS-7-x86_64-Minimal-1908.iso?checksum=sha256%3A9a2c47d97b9975452f7d582264e9fc16d108ed8252ac6816239a3b58cef5c53d => D:/openMrs/Bahmni-server-0.92/bahmni-vagrant/packer/iso/CentOS-7-x86_64-Minimal-1908.iso
==> virtualbox-iso: Starting HTTP server on port 8291
==> virtualbox-iso: Creating virtual machine...
==> virtualbox-iso: Creating hard drive...
==> virtualbox-iso: Creating forwarded port mapping for communicator (SSH, WinRM, etc) (host port 3193)
==> virtualbox-iso: Starting the virtual machine...
    virtualbox-iso: The VM will be run headless, without a GUI. If you want to
    virtualbox-iso: view the screen of the VM, connect via VRDP without a password to
    virtualbox-iso: rdp://127.0.0.1:5945
==> virtualbox-iso: Waiting 10s for boot...
==> virtualbox-iso: Typing the boot command...
==> virtualbox-iso: Using ssh communicator to connect: 127.0.0.1
==> virtualbox-iso: Waiting for SSH to become available...

cc @mksrom @angshuonline

Hi @mozzy I trust you got a solution to this, however, this post popped up in my searches when I encountered the same issue trying to build a CentOS box. I therefore put together the solution in this repository, I hope it helps someone out there.

Otherwise, to tailor the solution to your exact needs, you may just add the BAHMNI specific entries to the CentOS-7-x64.json which is the template file. More specific instructions in the repository README.

Regards.

2 Likes

thanks @miirochristopher .let me check it out.

1 Like