[SOLVED] parse error with cloud-init --cicustom

juronja

New Member
May 8, 2025
6
0
1
Maribor, Slovenia
Hello.

I am trying to get a custom cloud-init config working to install some default software on my VMs. But I hit an dead end with a parsing error when starting the VM.

Code:
TASK ERROR: unable to parse directory volume name '/var/lib/vz/snippets/ubuntu-homelab-cloud-init.yml'

I first tought It must be a yaml typo, but even if I dump and leave the config untouched I get the same error, so its not the configs.
This is my code:

Code:
# Configure Cloudinit datails
qm set $NEXTID --ciuser $OS_USER --cipassword $OS_PASS
qm cloudinit dump $NEXTID user > $CLOUD_INNIT_LOCAL
# wget $CLOUD_INNIT_GIT -O temp_cloud_init.yml
# cat temp_cloud_init.yml >> $CLOUD_INNIT_LOCAL
qm set $NEXTID --cicustom "user=local:$CLOUD_INNIT_LOCAL"
# rm temp_cloud_init.yml

I enabled snippets on the local storage and use the default path there.
What am I missing?

Thank you in advance
 
You are specifying absolute path on the hypervisor.

Does the directory and file exist? Use the same steps below to confirm.
You need to use PVE storage pool name, i.e: nfs:snippets

You can list the storage pool names via: pvesm status
You can then list available files and their PVE paths via : pvesm list [poolname]

This is the subroutine where your configuration fails: https://github.com/proxmox/pve-storage/blob/master/src/PVE/Storage/Plugin.pm#L666


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited:
  • Like
Reactions: juronja
Oh I see, very helpful!

- file exsist
- pool is default "local" and it lists
- path is available:

Code:
root@pve-4750g:~# pvesm list local
Volid                                                   Format  Type           Size VMID
local:backup/vzdump-lxc-104-2025_04_17-11_17_38.tar.zst tar.zst backup    983192271 104
local:iso/noble-server-cloudimg-amd64.img               iso     iso       611544576
local:snippets/ubuntu-homelab-cloud-init.yml            snippet snippets        219
local:vztmpl/alpine-3.21-default_20241217_amd64.tar.xz  txz     vztmpl      3153472
local:vztmpl/debian-11-standard_11.7-1_amd64.tar.zst    tzst    vztmpl    122247556
local:vztmpl/debian-12-standard_12.7-1_amd64.tar.zst    tzst    vztmpl    126515062


So instead of:
Code:
CLOUD_INNIT_LOCAL="/var/lib/vz/snippets/ubuntu-homelab-cloud-init.yml

I should use:
Code:
CLOUD_INNIT_LOCAL="snippets/ubuntu-homelab-cloud-init.yml"

I'll give it a try.