fix(vm_provision_mixin): cloud-init drive (ide2) needs images storage, not snippets

Proxmox's cloud-init drive is a disk image and requires a storage with
content='images' — the same requirement as the root disk — not the
snippets storage. These are commonly different storages (e.g. 'local'
with content=snippets-only, 'local-zfs' with content=images), and real
Proxmox now creates the VM fine but fails at *start* time with "storage
'X' does not support content-type 'images'" once it tries to generate
the cloud-init ISO.

Found live: a real deployment created the VM successfully, and only
failed when the user started it manually on the Proxmox side.
This commit is contained in:
Christian Manivong
2026-07-08 11:07:06 +02:00
parent 18fd3c8958
commit bcadd77420
2 changed files with 106 additions and 28 deletions
+8 -4
View File
@@ -375,7 +375,13 @@ class ProxmoxVMProvisionMixin:
_logger.info(f"Setting Cloud-Init config for VM {vmid}")
cloud_init_args = {
"ide2": f"{snippet_storage}:cloudinit",
# The cloud-init drive is a disk image — it needs a storage
# with content='images' (same requirement as the root disk),
# NOT the snippet storage (content='snippets'). These are
# often different storages; Proxmox fails at VM start with
# "storage 'X' does not support content-type 'images'" if
# this points at a snippets-only storage.
"ide2": f"{image_storage}:cloudinit",
"citype": "nocloud",
"cicustom": f"user={snippet_storage}:snippets/{filename}",
}
@@ -546,9 +552,7 @@ class ProxmoxVMProvisionMixin:
while True:
elapsed = time.time() - start_time
if wait_for_ip and elapsed > timeout:
raise RuntimeError(
f"VM {vmid} failed to acquire IP within {timeout}s"
)
raise RuntimeError(f"VM {vmid} failed to acquire IP within {timeout}s")
try:
# Query guest-agent network interfaces