- Deleted outdated files related to repository audit and deployment status, including AUDIT_COMPLETE.md, AUDIT_FIXES_APPLIED.md, FINAL_DEPLOYMENT_STATUS.md, and others. - Cleaned up documentation to streamline the repository and improve clarity for future maintenance. - Updated README and other relevant documentation to reflect the removal of these files.
2.7 KiB
VM Template vztmpl Format Issue
Date: 2025-12-11
Issue: vztmpl templates cannot be used for QEMU VMs
Problem
The provider code attempts to use vztmpl templates (LXC container templates) for QEMU VMs, which is incorrect.
Template Format: local:vztmpl/ubuntu-22.04-standard_22.04-1_amd64.tar.zst
Provider Behavior (Line 297 in client.go):
diskConfig = fmt.Sprintf("%s,format=qcow2", imageVolid)
// Results in: local:vztmpl/ubuntu-22.04-standard_22.04-1_amd64.tar.zst,format=qcow2
Problem: Proxmox cannot use a vztmpl template as a QEMU VM disk. This format is for LXC containers only.
Root Cause
-
vztmpl templates are for LXC containers
-
QEMU VMs need either:
- Cloud images (
.img,.qcow2) - requiresimportdisk - QEMU templates (VM templates converted from VMs)
- Cloud images (
-
The provider code doesn't distinguish between container templates and VM templates
Solutions
Option 1: Use Cloud Image (Current)
image: "local:iso/ubuntu-22.04-cloud.img"
Pros:
- ✅ Works with current provider code
- ✅ Cloud-init ready
- ✅ Available in storage
Cons:
- ⚠️ Requires
importdiskAPI (can cause locks) - ⚠️ Slower VM creation
- ⚠️ Needs provider code fix for proper task monitoring
Option 2: Create QEMU Template (Recommended Long-term)
- Create VM from cloud image
- Configure and customize
- Convert to template:
qm template <vmid> - Use template ID in image field
Pros:
- ✅ Fast cloning
- ✅ No import needed
- ✅ Pre-configured
Cons:
- ❌ Requires manual setup
- ❌ Need to maintain templates
Option 3: Fix Provider Code (Best Long-term)
- Detect
vztmplformat and reject for VMs - Add proper task monitoring for
importdisk - Wait for import completion before config updates
- Better error handling
Current Status
VM 100: Reverted to use cloud image format
image: "local:iso/ubuntu-22.04-cloud.img"- Will use
importdiskAPI - May experience lock issues until provider code is fixed
All Other Templates: Still using vztmpl format
- ⚠️ Will fail when deployed
- Need to be updated to cloud image format or QEMU template
Next Steps
- Immediate: Update all templates to use cloud image format
- Short-term: Monitor VM 100 creation with cloud image
- Long-term: Fix provider code for proper template handling
- Long-term: Create QEMU templates for faster deployment
Template Update Required
All 29 templates need to be updated from:
image: "local:vztmpl/ubuntu-22.04-standard_22.04-1_amd64.tar.zst"
To:
image: "local:iso/ubuntu-22.04-cloud.img"
Or use QEMU template ID if available.
Status: ⚠️ ISSUE IDENTIFIED - TEMPLATES NEED UPDATE