Ubuntu VMs cloned from cloud-init template do not execute cloud-init on first boot

justadri

New Member
Apr 4, 2024
4
0
1
Rochester, NY
Hello,

I am trying to create a cloud-init template for my VMs. I am on Proxmox VE 8.1.5. I am able to create the template, but when I clone it and attempt to start the clone, the cloud-init process never gets kicked off during boot (no ssh keys are generated, and ultimately I get a startup error in the cloned VM saying that SSHD could not be started). I am trying to use OVMF BIOS and q35 machine type so that I can use PCIe passthrough on the guest VM. These are the steps I am taking to create the template:

Bash:
wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64-disk-kvm.img

qm create 9009 --agent 1 --bios=ovmf --cores 2 --efidisk0 local-lvm:1 --machine q35 --memory 2048 --name "ubuntu-jammy-template" --net0 virtio,bridge=vmbr0 --ide2 local-lvm:cloudinit --serial0 socket --vga serial0 --ostype l26 --citype nocloud

qm disk import 9009 jammy-server-cloudimg-amd64-disk-kvm.img local-lvm

qm set 9009 --scsi0 local-lvm:vm-9009-disk-1 --scsihw virtio-scsi-pci --boot c --boot order=scsi0

qm template 9009

(I have also tried
Code:
--cdrom
instead of
Code:
--ide2
and gotten the same results)

I can't for the life of me tell what I am doing wrong. Any suggestions?

Thank you!

~ Adri
 
Thank you for the reply @bbgeek17 , I forgot to mention, I did also try --scsi1 in place of --ide2 and got the error unable to parse lvm volume name 'cloudinit'
You need to provide actual commands you ran, exactly how you ran them, along with the exact output you received - all as one snippet.
There are no massive reports of broken cloud-init functionality in the forum. It works just fine for me as well:
Code:
qm create 9000
qm set 9000 --scsi1 local-lvm:cloudinit
update VM 9000: -scsi1 local-lvm:cloudinit
  Logical volume "vm-9000-cloudinit" created.
scsi1: successfully created disk 'local-lvm:vm-9000-cloudinit,media=cdrom'
generating cloud-init ISO


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited:
You need to provide actual commands you ran, exactly how you ran them, along with the exact output you received - all as one snippet.

Bash:
root@hera:~# qm create 9009
root@hera:~# qm set 9009 --scsi1 local-lvm:cloudinit
update VM 9009: -scsi1 local-lvm:cloudinit
unable to parse lvm volume name 'cloudinit'

I wasn't sure how to get the log output, but if you can direct me, I'm happy to include it.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!