- Add comprehensive database migrations (001-024) for schema evolution - Enhance API schema with expanded type definitions and resolvers - Add new middleware: audit logging, rate limiting, MFA enforcement, security, tenant auth - Implement new services: AI optimization, billing, blockchain, compliance, marketplace - Add adapter layer for cloud integrations (Cloudflare, Kubernetes, Proxmox, storage) - Update Crossplane provider with enhanced VM management capabilities - Add comprehensive test suite for API endpoints and services - Update frontend components with improved GraphQL subscriptions and real-time updates - Enhance security configurations and headers (CSP, CORS, etc.) - Update documentation and configuration files - Add new CI/CD workflows and validation scripts - Implement design system improvements and UI enhancements
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