Jemand Cloud-Init Debian 11 auf pve 7.0/7.1 zum laufen gebracht?

3deep5me

Member
Aug 14, 2021
12
1
8
24
Hallo liebe Community,

hat es schon mal jemand geschafft ein funktionierendes Debian 11 cloud-init template in PVE 7.1/7.0 zum laufen zu bekommen?
Ich erstelle es ähnlich wie in der Anleitung und was man so auf Github findet so:
Bash:
wget https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-generic-amd64.qcow2

qm create 9006 --name debian-11-cloudinit-template --cores 4 --memory 16384 --net0 virtio,bridge=vmbr0

qm importdisk 9006 debian-11-generic-amd64.qcow2 fast -format qcow2

qm set 9006 --scsihw virtio-scsi-pci --scsi0 fast:vm-9006-disk-0

# Important settings
qm set 9006 --ide2 fast:cloudinit --boot c --bootdisk scsi0 --serial0 socket --vga serial0

# The initial disk is only 2GB, thus we make it larger
qm resize 9006 scsi0 +48G

# Using a  dhcp server on vmbr1 or use static IP
qm set 9006 --ipconfig0 ip=dhcp

Restliches Cloud-Init config + Clonen mache ich über die GUI.

Lande beim starten aber immer in den initramfs mit der Meldung das das rootfs nicht gefunden wurde.

Würde mich wirklich freuen wenn jemand einen Vorschlag hätte oder es auch einfach mal bei sich probieren kann.
(Mit CentOS8 hat es geklappt)

Viele Grüße
 
Last edited:
Habe es hier ebenfalls versucht und nur bei Memory/Storage/Disk Size die Werte verändert.
Ein Boot funktionierte nicht, da das Image nicht kompatibel mit einem Serial Port zu sein scheint. Nach dem Ändern von vga auf default, bootete das Image Problemlos.
Ein Problem mit `rootfs` konnte nicht gefunden werden, kam gar nicht.
 
Hi,
danke für die Rückmeldung :).
Wäre es möglich die Conf Datei des Templates zu teilen? oder ein Screenshot von der Config (GUI) würde auch schon reichen.

Nach dem Entfernen von dem Serial Port und das Umstellen vom Monitor auf default, lade ich aktuell irgendwo bei USB Tastatur Initialisierung.

Schönen Abend noch bzw. einen guten start in den Tag.

Viele Grüße
 
Die VM Config sieht so aus:
Code:
boot: c
bootdisk: scsi0
cores: 2
ide2: nvme-data:vm-9006-cloudinit,media=cdrom
ipconfig0: ip=dhcp
memory: 4096
meta: creation-qemu=6.1.0,ctime=1638290149
name: debian-11-cloudinit-template
net0: virtio=42:C9:B1:78:00:85,bridge=vmbr0
scsi0: nvme-data:vm-9006-disk-0,size=6G
scsihw: virtio-scsi-pci
smbios1: uuid=c94cf096-ad9b-400a-8267-7ed96e7c35ff
vmgenid: c0493a76-2b37-45da-b8d4-d39aa6491f52

Kann es sein, dass das Template fehlerhaft war? Hast du es mit einem neueren Template versucht?
 
Danke für die Config, habe gerade nochmal ein frisches Image gezogen und ein neues Template erstellt.
Sieht jetzt wie folgt aus:
1638382628423.png


Hier nochmal meine Config:
Code:
boot: c
bootdisk: scsi0
cores: 4
ide2: fast2:vm-101-cloudinit,media=cdrom,size=4M
ipconfig0: ip=dhcp
memory: 16384
meta: creation-qemu=6.1.0,ctime=1638382181
name: debian-test
net0: virtio=36:0E:2A:9C:79:57,bridge=vmbr0
scsi0: fast2:vm-101-disk-0,size=50G
scsihw: virtio-scsi-pci
smbios1: uuid=8e67a96e-4538-463a-8120-5b57232a55e0
sshkeys: xxx
vmgenid: f443bf60-a665-427e-a8e0-b6863dfe2148

Hier das erweiterte Script (hab vga/serial mal aus kommentiert)
(fast2 durch entsprechenden Storage ersetzten)

Bash:
wget https://cloud.debian.org/images/cloud/bullseye/latest/debian-11-generic-amd64.qcow2

qm create 9006 --name debian-11-cloudinit-template --cores 4 --memory 16384 --net0 virtio,bridge=vmbr0

qm importdisk 9006 debian-11-generic-amd64.qcow2 fast2 -format qcow2

qm set 9006 --scsihw virtio-scsi-pci --scsi0 fast2:vm-9006-disk-0

# Important settings
qm set 9006 --ide2 fast2:cloudinit --boot c --bootdisk scsi0 #--serial0 socket --vga serial0

# The initial disk is only 2GB, thus we make it larger
qm resize 9006 scsi0 +48G

# Using a  dhcp server on and ssh key
qm set 9006 --ipconfig0 ip=dhcp
qm set 9006 --sshkey /root/.ssh/authorized_keys
#qm set 9006 --ipconfig0 ip=10.10.10.222/24,gw=10.10.10.1

qm cloudinit dump 9006 user

qm template 9006

qm clone 9006 102 --name debian-test

Gruß
 
Wie sehen denn die Pakete aus? pveversion -v

Wenn du jetzt andere VMs erstellst mit SeaBIOS (Default), starten diese ohne Probleme?
 
Hab grad nochmal Updates gemacht, alles aktuell:

Code:
root@node01:~# pveversion -v
proxmox-ve: 7.1-1 (running kernel: 5.13.19-2-pve)
pve-manager: 7.1-7 (running version: 7.1-7/df5740ad)
pve-kernel-helper: 7.1-6
pve-kernel-5.13: 7.1-5
pve-kernel-5.11: 7.0-10
pve-kernel-5.13.19-2-pve: 5.13.19-4
pve-kernel-5.13.19-1-pve: 5.13.19-3
pve-kernel-5.11.22-7-pve: 5.11.22-12
pve-kernel-5.11.22-5-pve: 5.11.22-10
pve-kernel-5.11.22-3-pve: 5.11.22-7
pve-kernel-5.11.22-1-pve: 5.11.22-2
ceph-fuse: 15.2.13-pve1
corosync: 3.1.5-pve2
criu: 3.15-1+pve-1
glusterfs-client: 9.2-1
ifupdown2: 3.1.0-1+pmx3
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-1
libknet1: 1.22-pve2
libproxmox-acme-perl: 1.4.0
libproxmox-backup-qemu0: 1.2.0-1
libpve-access-control: 7.1-5
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.0-14
libpve-guest-common-perl: 4.0-3
libpve-http-server-perl: 4.0-4
libpve-storage-perl: 7.0-15
libspice-server1: 0.14.3-2.1
lvm2: 2.03.11-2.1
lxc-pve: 4.0.9-4
lxcfs: 4.0.8-pve2
novnc-pve: 1.2.0-3
proxmox-backup-client: 2.1.2-1
proxmox-backup-file-restore: 2.1.2-1
proxmox-mini-journalreader: 1.3-1
proxmox-widget-toolkit: 3.4-4
pve-cluster: 7.1-2
pve-container: 4.1-2
pve-docs: 7.1-2
pve-edk2-firmware: 3.20210831-2
pve-firewall: 4.2-5
pve-firmware: 3.3-3
pve-ha-manager: 3.3-1
pve-i18n: 2.6-2
pve-qemu-kvm: 6.1.0-3
pve-xtermjs: 4.12.0-1
qemu-server: 7.1-4
smartmontools: 7.2-1
spiceterm: 3.2-2
swtpm: 0.7.0~rc1+2
vncterm: 1.7-1
zfsutils-linux: 2.1.1-pve3

CentOS 8 Image kann deployen, läuft wie alles andere auch mit SeaBIOS.
 
Verrückt, mit typ Host-CPU geht es, aber auch erst nach dem 2. start versuch.
Hab das jetzt drei mal probiert und zwei mal ging es, teilweise ging es wie oben beschrieben erst nach dem 2. start versuch, teilweise gar nicht mehr. Ich werde nochmal etwas testen, ob es eine Möglichkeit gibt wie es verlässlich geht.
Du hast wahrscheinlich eine Intel CPU oder? Evtl. liegt es daran das ich eine AMD CPU habe, müsste man mal mit einer AMD CPU probieren.

*Update*
Template mit --cpu host erstellen, clone vom Template, VM starten, VM stoppen und wieder starten dann geht es. ‍
 
Last edited:
@aaron hat es versucht nachzustellen auf seiner Workstation, da hat es jedoch auf Anhieb funktioniert.
Hier scheint also etwas sehr komisch zu sein.
 
Okay, merkwürdig, trotzdem vielen vielen Dank!
Habe ja jetzt einen weg gefunden wie es trotzdem geht.
Falls jemand das gleiche Problem haben sollte, gerne mal drunter kommentieren.
 
  • Like
Reactions: mira
Okay, weird, thanks anyway!
I've found a way how to do it anyway.
If anyone has the same problem, please comment below.
how?:)
I have the same issue. After a resize, first boot is with kernel panic. After a reboot everything works.
I can replicate with Debian 11
 
  • Like
Reactions: 3deep5me
Its back again... Its the same with debian and ubuntu...
Does somebody get this to work on proxmox 7.2.11 or is something wrong with what i do?
I think does not find the filesystem:
1665930327266.png
1665930480404.png
Bash:
wget https://cloud-images.ubuntu.com/kinetic/current/kinetic-server-cloudimg-amd64.img

#./e2e.sh fast2 9016 kinetic-server-cloudimg-amd64.img ubuntu-kinetic-template 116
storage=$1
templateid=$2
imagefile=$3
templatename=$4
cloneid=$5


qm create $templateid --name $templatename --memory 2048 --cores 2 --net0 virtio,bridge=vmbr0
qm importdisk $templateid $imagefile $storage
qm set $templateid --scsihw virtio-scsi-pci --scsi0 $storage:vm-$templateid-disk-0
qm set $templateid --ide2 $storage:cloudinit
qm set $templateid --boot c --bootdisk scsi0
qm set $templateid --serial0 socket --vga serial0
qm set $templateid --agent enabled=1
qm template $templateid
qm clone $templateid $cloneid --name ubuntu-test
qm start $cloneid

Thanks in advanced for help!
 
Last edited:
Its totally random!
But i think its due to the storage or resize. But i can reproduce it every time right now in PVE 8.0.9. The behaviour changed out of nowhere. No update or reboot.
 
Which image do you use?
Please provide the VM config (qm config <VMID>) as well as the output of pveversion -v.
Do you use a custom cloud.cfg in the guest?
What kind of storage do you use?
 
Hi @mira,
i testet a bit more around, it is definitely something with the storage.
With lvm-thin it does not work at all.
On storage type "dir" it does work without any problems. (local)

I hope these Information's help:
Is the Storage general functional?
Yes i cloned and use a windows machine on the storage.

Which image do you use?
https://cloud.debian.org/images/clo...2/debian-12-generic-amd64-20231013-1532.qcow2

qm config
agent: enabled=1
boot: order=scsi0
cicustom: user=proxkontrol:snippets/proxkontrol-controlplane-28qgg-user.yml
cores: 4
ide2: fast2:vm-105-cloudinit,media=cdrom
ipconfig0: ip=dhcp
memory: 8192
meta: creation-qemu=8.1.2,ctime=1700921143
name: proxkontrol-controlplane-28qgg
net0: virtio=BC:24:11:41:A7:C0,bridge=vmbr0,firewall=1
scsi0: fast2:vm-105-disk-0,size=50G
scsihw: virtio-scsi-pci
serial0: socket
smbios1: uuid=03230b04-118a-49f5-8a3b-3d64dbdde33e
vga: serial0
vmgenid: 3348e16e-b948-4979-b447-ec99bf1990fe

Do you use a custom cloud.cfg in the guest?
Yes

pveversion -v
Bash:
proxmox-ve: 8.1.0 (running kernel: 6.5.11-4-pve)
pve-manager: 8.1.3 (running version: 8.1.3/b46aac3b42da5d15)
proxmox-kernel-helper: 8.0.9
pve-kernel-6.2: 8.0.5
proxmox-kernel-6.5.11-4-pve-signed: 6.5.11-4
proxmox-kernel-6.5: 6.5.11-4
proxmox-kernel-6.2.16-19-pve: 6.2.16-19
proxmox-kernel-6.2: 6.2.16-19
proxmox-kernel-6.2.16-15-pve: 6.2.16-15
pve-kernel-6.2.16-5-pve: 6.2.16-6
pve-kernel-6.2.16-4-pve: 6.2.16-5
pve-kernel-6.2.16-3-pve: 6.2.16-3
pve-kernel-5.15.108-1-pve: 5.15.108-1
pve-kernel-5.15.102-1-pve: 5.15.102-1
pve-kernel-5.13.19-6-pve: 5.13.19-15
pve-kernel-5.13.19-2-pve: 5.13.19-4
pve-kernel-5.11.22-7-pve: 5.11.22-12
pve-kernel-5.11.22-1-pve: 5.11.22-2
ceph-fuse: 16.2.11+ds-2
corosync: 3.1.7-pve3
criu: 3.17.1-2
glusterfs-client: 10.3-5
ifupdown2: 3.2.0-1+pmx7
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-4
libknet1: 1.28-pve1
libproxmox-acme-perl: 1.5.0
libproxmox-backup-qemu0: 1.4.0
libproxmox-rs-perl: 0.3.1
libpve-access-control: 8.0.7
libpve-apiclient-perl: 3.3.1
libpve-common-perl: 8.1.0
libpve-guest-common-perl: 5.0.6
libpve-http-server-perl: 5.0.5
libpve-network-perl: 0.9.4
libpve-rs-perl: 0.8.7
libpve-storage-perl: 8.0.5
libspice-server1: 0.15.1-1
lvm2: 2.03.16-2
lxc-pve: 5.0.2-4
lxcfs: 5.0.3-pve3
novnc-pve: 1.4.0-3
proxmox-backup-client: 3.0.4-1
proxmox-backup-file-restore: 3.0.4-1
proxmox-kernel-helper: 8.0.9
proxmox-mail-forward: 0.2.2
proxmox-mini-journalreader: 1.4.0
proxmox-offline-mirror-helper: 0.6.2
proxmox-widget-toolkit: 4.1.3
pve-cluster: 8.0.5
pve-container: 5.0.8
pve-docs: 8.1.3
pve-edk2-firmware: 4.2023.08-1
pve-firewall: 5.0.3
pve-firmware: 3.9-1
pve-ha-manager: 4.0.3
pve-i18n: 3.1.2
pve-qemu-kvm: 8.1.2-4
pve-xtermjs: 5.3.0-2
qemu-server: 8.0.10
smartmontools: 7.3-pve1
spiceterm: 3.3.0
swtpm: 0.8.0+pve1
vncterm: 1.8.0
zfsutils-linux: 2.2.0-pve3

Storage:
(also tested it with another lvm-thin)

Bash:
  --- Physical volume ---
  PV Name               /dev/nvme0n1
  VG Name               nvme2tb
  PV Size               <1.82 TiB / not usable <1.09 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              476932
  Free PE               0
  Allocated PE          476932
  PV UUID               pHaJ9j-a0pH-IWK8-JKN7-u1z3-VybL-3VpVv7

  --- Volume group ---
  VG Name               nvme2tb
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  9095
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                37
  Open LV               5
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               <1.82 TiB
  PE Size               4.00 MiB
  Total PE              476932
  Alloc PE / Size       476932 / <1.82 TiB
  Free  PE / Size       0 / 0
  VG UUID               u4pcft-0P18-l6xs-7Zu3-bPh8-RoEb-4szWyH
 
    --- Logical volume ---
  LV Name                fast2
  VG Name                nvme2tb
  LV UUID                vJAFZ8-SUwr-Qnxw-6xcz-nTSc-051A-y0nKmh
  LV Write Access        read/write (activated read only)
  LV Creation host, time node01, 2021-11-30 18:15:21 +0100
  LV Pool metadata       fast2_tmeta
  LV Pool data           fast2_tdata
  LV Status              available
  # open                 0
  LV Size                <1.32 TiB
  Allocated pool data    4.05%
  Allocated metadata     12.11%
  Current LE             345816
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     4096
  Block device           252:7     

LV                VG      Attr       LSize    Pool        Origin Data%  Meta%  Move Log Cpy%Sync Convert
fast2             nvme2tb twi-aot---   <1.32t                    4.05   12.11
 

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!