create_vm_from_cloud_init leaves a half-built VM behind when it fails after taking the VMID #28

Closed
opened 2026-10-18 19:45:22 +00:00 by christianmanivong · 0 comments
Owner

When create_vm_from_cloud_init raises after the VMID was allocated (failed disk import, failed start, …), the half-built VM stays on the hypervisor and the exception carries no VMID, so the caller can't remove it. netOrk now removes the VM of a failed job (NetOrk/netork#1141), but only when it got the id back.

Fix: clean up inside the driver on failure, or attach the vmid/node to the exception.

Prio P4.

When `create_vm_from_cloud_init` raises after the VMID was allocated (failed disk import, failed start, …), the half-built VM stays on the hypervisor and the exception carries no VMID, so the caller can't remove it. netOrk now removes the VM of a failed job (NetOrk/netork#1141), but only when it got the id back. **Fix:** clean up inside the driver on failure, or attach the vmid/node to the exception. **Prio P4.**
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-proxmox#28