はじめに
proxmox で Cloud-init 対応イメージを使用する場合は、コマンドから導入する必要があるため、主要イメージの導入手順・コマンドをまとめておきます。
ご参考まで。
Ubuntu
Ubuntu 20.04 LTS
wget -P /var/lib/vz/images/ https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64-disk-kvm.img
qm create 9002 --name ubuntu-2004-cloudinit --memory 2048 --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-pci
qm set 9002 --scsi0 local-lvm:0,import-from=/var/lib/vz/images/focal-server-cloudimg-amd64-disk-kvm.img
qm set 9002 --ide2 local-lvm:cloudinit
qm set 9002 --boot order=scsi0
qm set 9002 --serial0 socket --vga serial0
qm set 9002 --agent enabled=1
qm template 9002
Ubuntu 20.04 LTS (Focal Fossa) daily [20250429]
Ubuntu 22.04 LTS
wget -P /var/lib/vz/images/ https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64-disk-kvm.img
qm create 9003 --name ubuntu-2204-cloudinit --memory 2048 --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-pci
qm set 9003 --scsi0 local-lvm:0,import-from=/var/lib/vz/images/jammy-server-cloudimg-amd64-disk-kvm.img
qm set 9003 --ide2 local-lvm:cloudinit
qm set 9003 --boot order=scsi0
qm set 9003 --serial0 socket --vga serial0
qm set 9003 --agent enabled=1
qm template 9003
Ubuntu 22.04 LTS (Jammy Jellyfish) daily [20250430]
Ubuntu 24.04 LTS
24からはkvm optimizeイメージは無い
wget -P /var/lib/vz/images/ https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img
qm create 9004 --name ubuntu-2404-cloudinit --memory 2048 --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-pci
qm set 9004 --scsi0 local-lvm:0,import-from=/var/lib/vz/images/noble-server-cloudimg-amd64.img
qm set 9004 --ide2 local-lvm:cloudinit
qm set 9004 --boot order=scsi0
qm set 9004 --serial0 socket --vga serial0
qm set 9004 --agent enabled=1
qm template 9004
Ubuntu 24.04 LTS (Noble Numbat) daily [20250430]
CentOS
CentOS8
wget -P /var/lib/vz/images/ https://cloud.centos.org/centos/8/x86_64/images/CentOS-8-GenericCloud-8.4.2105-20210603.0.x86_64.qcow2
qm create 9011 --name centos-8-cloudinit --memory 2048 --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-pci
qm set 9011 --scsi0 local-lvm:0,import-from=/var/lib/vz/images/CentOS-8-GenericCloud-8.4.2105-20210603.0.x86_64.qcow2
qm set 9011 --ide2 local-lvm:cloudinit
qm set 9011 --boot order=scsi0
qm set 9011 --serial0 socket --vga serial0
qm set 9011 --agent enabled=1
qm template 9011
CentOS Cloud Images
CentOS9
GenericCloud に2種類あるが、proxmox では x86_64 を使用する
wget -P /var/lib/vz/images/ https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-GenericCloud-x86_64-9-latest.x86_64.qcow2
qm create 9012 --name centos-9-cloudinit --memory 2048 --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-pci
qm set 9012 --scsi0 local-lvm:0,import-from=/var/lib/vz/images/images/CentOS-Stream-GenericCloud-x86_64-9-latest.x86_64.qcow2
qm set 9012 --ide2 local-lvm:cloudinit
qm set 9012 --boot order=scsi0
qm set 9012 --serial0 socket --vga serial0
qm set 9012 --agent enabled=1
qm template 9012
CentOS Cloud Images
Rocky Linux
Rocky Linux8
wget -P /var/lib/vz/images/ https://dl.rockylinux.org/pub/rocky/8/images/x86_64/Rocky-8-GenericCloud-Base.latest.x86_64.qcow2
qm create 9021 --name rocky8latest-template --memory 2048 --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-pci
qm set 9021 --scsi0 local-lvm:0,import-from=/var/lib/vz/images/Rocky-8-GenericCloud-Base.latest.x86_64.qcow2
qm set 9021 --ide2 local-lvm:cloudinit
qm set 9021 --boot order=scsi0
qm set 9021 --serial0 socket --vga serial0
qm template 9021
Index of /pub/rocky/8/images/x86_64/
Rocky Linux 9
wget -P /var/lib/vz/images/ https://dl.rockylinux.org/pub/rocky/9/images/x86_64/Rocky-9-GenericCloud.latest.x86_64.qcow2
qm create 9022 --name rocky8latest-template --memory 2048 --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-pci
qm set 9022 --scsi0 local-lvm:0,import-from=/var/lib/vz/images/Rocky-9-GenericCloud.latest.x86_64.qcow2
qm set 9022 --ide2 local-lvm:cloudinit
qm set 9022 --boot order=scsi0
qm set 9022 --serial0 socket --vga serial0
qm template 9022
Index of /pub/rocky/9/images/x86_64/
参考
Cloud-Init Support - Proxmox VE

Proxmoxで公式qcow2イメージからVMを作成する(Ubuntu,Rocky,Alma,RHEL) - Qiita
はじめに以前にProxmox上にLinuxVMを新規インストールする手法としてKickstartを利用したエントリを書きました。…

Proxmox VEのcloudinitでuserdataを自由に調整する
以前 Proxmox VE 5.2でCloud-Initが使えるようになったので使う話 を書いたのですが、 関連して Proxmox VE 6.0 から "custom Cloudinit configurations" がサポートされるよ...

Proxmox Ubuntu 22.04 Jammy LTS Cloud-init Image Script - Austin's Nerdy Things
Been a while since I last posted. For basically everything I do Linux-wise, I use Ubuntu. Specifically the Long Term Sup...
コメント