[SOLVED] Cloud-Init snippets can't be loaded on reboot

crs369

New Member
Sep 15, 2022
11
1
3
When i reboot my node and the VM's restart again, i get the following message:

TASK ERROR: can't open '/mnt/pve/proxshared/snippets/cloudinit.yaml' - No such file or directory

My VM's using cloud-init and the installation process works normal.

The log from from the proxmox Node shows this:

Sep 8 07:01:14 proxmox-00 pvesh[1279]: got quorum Sep 8 07:01:14 proxmox-00 pvesh[1279]: Starting VM 110 Sep 8 07:01:14 proxmox-00 pve-guests[1280]: <root@pam> starting task UPID:proxmox-00:00000501:00000690:6319771A:qmstart:110:root@pam: Sep 8 07:01:14 proxmox-00 pve-guests[1281]: start VM 110: UPID:proxmox-00:00000501:00000690:6319771A:qmstart:110:root@pam: Sep 8 07:01:14 proxmox-00 pve-guests[1281]: can't open '/mnt/pve/proxshared/snippets/cloudinit.yaml' - No such file or directory Sep 8 07:01:15 proxmox-00 pvesh[1279]: Starting VM 110 failed: can't open '/mnt/pve/proxshared/snippets/cloudinit.yaml' - No such file or directory Sep 8 07:01:15 proxmox-00 pvesh[1279]: Starting VM 111 Sep 8 07:01:15 proxmox-00 pve-guests[1283]: start VM 111: UPID:proxmox-00:00000503:000006F5:6319771B:qmstart:111:root@pam: Sep 8 07:01:15 proxmox-00 pve-guests[1280]: <root@pam> starting task UPID:proxmox-00:00000503:000006F5:6319771B:qmstart:111:root@pam: Sep 8 07:01:15 proxmox-00 pve-guests[1283]: can't open '/mnt/pve/proxshared/snippets/cloudinit.yaml' - No such file or directory Sep 8 07:01:16 proxmox-00 pvesh[1279]: Starting VM 111 failed: can't open '/mnt/pve/proxshared/snippets/cloudinit.yaml' - No such file or directory Sep 8 07:01:16 proxmox-00 pvesh[1279]: Starting VM 112 Sep 8 07:01:16 proxmox-00 pve-guests[1280]: <root@pam> starting task UPID:proxmox-00:00000504:0000075A:6319771C:qmstart:112:root@pam: Sep 8 07:01:16 proxmox-00 pve-guests[1284]: start VM 112: UPID:proxmox-00:00000504:0000075A:6319771C:qmstart:112:root@pam: Sep 8 07:01:16 proxmox-00 kernel: [ 19.246196] FS-Cache: Loaded Sep 8 07:01:16 proxmox-00 kernel: [ 19.263689] FS-Cache: Netfs 'nfs' registered for caching Sep 8 07:01:16 proxmox-00 kernel: [ 19.384486] NFS: Registering the id_resolver key type Sep 8 07:01:16 proxmox-00 kernel: [ 19.384492] Key type id_resolver registered Sep 8 07:01:16 proxmox-00 kernel: [ 19.384493] Key type id_legacy registered Sep 8 07:01:16 proxmox-00 nfsidmap[1300]: nss_getpwnam: name 'root@local' does not map into domain 'localdomain' Sep 8 07:01:17 proxmox-00 nfsidmap[1302]: nss_getpwnam: name 'proxmox@local' does not map into domain 'localdomain' Sep 8 07:01:17 proxmox-00 systemd[1]: Created slice qemu.slice. Sep 8 07:01:17 proxmox-00 systemd[1]: Started 112.scope.

The Three VM's all use the same cloud-init snippets and only the VM 110 and 112 failing. The VM 112 works normal.

Looks like an race condition with the NFS that follows in the log.

Im using in the Moment the newest pve-kernel-5.19 (Link) but the problems was also in the kernel 5.15 at newest patch level.
 
Ideally PVE would be aware of storage being there as a requirement. Absent that, perhaps this may help:
https://pve.proxmox.com/wiki/Proxmox_Node_Management
Code:
First Guest Boot Delay
In case your VMs/containers rely on slow-to-start external resources, for example an NFS server, you can also set a per-node delay between the time Proxmox VE boots and the time the first VM/container that is configured to autostart boots (see Automatic Start and Shutdown of Virtual Machines).

You can achieve this by setting the following (where 10 represents the delay in seconds):

pvenode config set --startall-onboot-delay 10


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 

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!