[SOLVED] Proxmox cloud-init not working on Ubuntu 24 Server/Desktop

midgetseeker

New Member
Mar 17, 2023
10
1
3
Hello all,

I'm in the process of adopting Ubuntu 24 as the next upgrade in my infra but on validation it looks like cloud-init doesn't work anymore.

My host:

root@proxmox-server:~# pveversion
pve-manager/8.1.4/ec5affc9e41f1d79 (running kernel: 6.5.11-8-pve)

Later edit:

Turns out that cloud-init config is disabled by default on U24 server/desktop.
To enable it AFTER you've added a cloud-init drive and applied the pve config you need to run the below command and reboot:
Code:
sudo cloud-init clean --machine-id

Hope this helps others from head scratching.
Regards.
 
Ubuntu produces specific images for cloud deployment - https://cloud-images.ubuntu.com/. The Desktop and Server variants are not meant for cloud deployment, so its not surprising that they lack CloudInit by default.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
I know that but the cloud-init datasource from proxmox works on Ubuntu 22 just fine.

I have no way to automate my VM deployment if cloud-init is not working. I'm using the ansible proxmox modules to provision VM's from templates in a playbook.

It works ok on U22, but U24 is... microsofty
 
Turns out that U24 doesn't like the IDE bus anymore.

It's happy to boot from an IDE bus cd-rom but not load cloud-init from there.

The fix seems to need a change from VirtIO-SCSI-Single to VirtIO-SCSI as the main controller and map the cloud-init drive to a scsi bus id.

The example config that works for me looks like this:
agent: enabled=1,fstrim_cloned_disks=1
bios: ovmf
boot: c
bootdisk: scsi0
cipassword: /etc/yomomma
ciupgrade: 0
ciuser: yomamma
cores: 4
cpu: x86-64-v2-AES
efidisk0: yomamma_disks:vm-000-disk-0,efitype=4m,pre-enrolled-keys=1,size=4M
ipconfig0: ip=192.168.500.500/24,gw=192.168.500.500
localtime: 1
memory: 4096
meta: creation-qemu=8.1.5,ctime=1714376435
name: u24-test
nameserver: 192.168.500.500
net0: virtio=12:23:34:45:56:67,bridge=vmbr0,firewall=1
numa: 0
onboot: 1
ostype: l26
scsi0: yomamma_disks_disks:vm-000-disk-1,iothread=1,size=100G,ssd=1
scsi1: yomamma_disks_disks:vm-000-cloudinit,media=cdrom
scsihw: virtio-scsi-pci
searchdomain: local service.consul node.consul
smbios1: uuid=yomamma
sockets: 1
sshkeys: ssh-rsa yomamma
vga: memory=128
vmgenid: yomamma
 

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!