So I'm trying to use cloud-init with minimal image ( https://cloud-images.ubuntu.com/minimal/releases/focal/release/ubuntu-20.04-minimal-cloudimg-amd64.img ) but it does not seem to work at all. The exact same procedure works with the server image ( https://cloud-images.ubuntu.com/releases/focal/release/ubuntu-20.04-server-cloudimg-amd64.img ).
I'm using with meta-data and user-data with genisoimage -output cloud-init.iso -volid cidata -joliet -rock meta-data user-data
.
I then boot it up with virt-install --connect qemu:///system --virt-type kvm --os-type linux --os-variant ubuntu20.04 --disk path=image.qcow2,bus=scsi,format=qcow2 --disk path=cloud-init.iso,device=cdrom --controller type=scsi,model=virtio-scsi --import --network network:default
In user-data I try to debug it with just using runcmd in user-data to touch /debug but when booting it up manually afterwards to investigate there is no such file so runcmd doesn't seem to run at all. Keep in mind that the exact same procedure works fine with the server-cloudimg.Running dpkg -l
on the minimal image shows the cloud-init package being installed.
user-data
#cloud-config
runcmd:
- touch /debug
meta-data
instance-id: iid-0