sdhibit / packer-proxmox-templates

Proxmox images built with Packer
55 stars 19 forks source link

Stuck at cloud-init console #7

Open pkshr opened 3 years ago

pkshr commented 3 years ago

I tried the ubuntu-20.04 template. VM boots up but packer keeps on waiting for SSH:

packer-proxmox-templates/ubuntu-20.04-amd64# packer build .
file.meta_data: output will be in this color.
file.user_data: output will be in this color.
proxmox.ubuntu: output will be in this color.

==> file.meta_data: Copying ./templates/meta-data.tpl to ./http/meta-data
==> file.meta_data: Copied 0 bytes
==> file.meta_data: Provisioning with shell script: /tmp/packer-shell646166813
==> file.user_data: Provisioning with shell script: /tmp/packer-shell043376796
==> file.meta_data: Provisioning with shell script: /tmp/packer-shell415061586
==> file.user_data: Provisioning with shell script: /tmp/packer-shell299795064
==> proxmox.ubuntu: Retrieving ISO
==> proxmox.ubuntu: Trying https://releases.ubuntu.com/focal/ubuntu-20.04.2-live-server-amd64.iso
==> file.meta_data: Provisioning with shell script: /tmp/packer-shell420902660
==> proxmox.ubuntu: Trying https://releases.ubuntu.com/focal/ubuntu-20.04.2-live-server-amd64.iso?checksum=sha256%3Ad1f2bf834bbe9bb43faf16f9be992a6f3935e65be0edece1dee2aa6eb1767423
==> file.user_data: Provisioning with shell script: /tmp/packer-shell867877666
Build 'file.user_data' finished after 52 milliseconds 678 microseconds.
Build 'file.meta_data' finished after 52 milliseconds 782 microseconds.
==> proxmox.ubuntu: https://releases.ubuntu.com/focal/ubuntu-20.04.2-live-server-amd64.iso?checksum=sha256%3Ad1f2bf834bbe9bb43faf16f9be992a6f3935e65be0edece1dee2aa6eb1767423 => /root/bamboo_agent_setup/packer/test5-hcl/packer-proxmox-templates/ubuntu-20.04-amd64/packer_cache/b517145adf12daef464c16d34da03464aa585881.iso
==> proxmox.ubuntu: Creating VM
==> proxmox.ubuntu: Starting VM
==> proxmox.ubuntu: Starting HTTP server on port 8478
==> proxmox.ubuntu: Waiting 5s for boot
==> proxmox.ubuntu: Typing the boot command
==> proxmox.ubuntu: Waiting for SSH to become available...

In proxmox UI console, VM is stuck at "cloud-init[1023]: Cloud-init v.20.4.1-0ubuntu1~20.04.1 running 'init-local' at Thu, 15 Apr 2021 16:44:11 ...."

es-arif commented 2 years ago

Haven't tried this, but this happens to me when dhcp isn't set as an option for cloud-init (seeing as the target VM doesn't get an IP).

Maybe check if the created image has an IP?