- 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
3.8 KiB
3.8 KiB
VM Template Review Summary
Date: 2025-12-11
Action: Reviewed all VM templates for image configuration issues
Template Image Format Analysis
Current State
Total Templates: 29 production templates
Image Format Distribution
-
Volid Format (1 template):
vm-100.yaml:local:iso/ubuntu-22.04-cloud.img- ⚠️ Issue: Triggers
importdiskAPI, causes lock timeouts
-
Search Format (28 templates):
- All others:
ubuntu-22.04-cloud - ⚠️ Issue: Provider searches storage, can timeout if image not found
- All others:
Root Cause
Problem 1: Volid Format with .img Extension
image: "local:iso/ubuntu-22.04-cloud.img"
Provider Behavior:
- Detects volid format (contains
:) - Detects
.imgextension → triggersimportdisk - Creates VM with blank disk
- Calls
importdiskAPI → holds lock - Tries to update config → fails (locked)
- Lock never releases → VM stuck
Problem 2: Search Format
image: "ubuntu-22.04-cloud"
Provider Behavior:
- Searches all storage pools for image
- Storage operations can timeout
- If not found → VM created without disk
- If found → may still trigger import if
.imgextension
Available Images in Storage
From Proxmox node:
- ✅
local:iso/ubuntu-22.04-cloud.img(660M) - Cloud image - ✅
local:vztmpl/ubuntu-22.04-standard_22.04-1_amd64.tar.zst(124M) - Template
Recommended Solutions
Option 1: Use Existing Template (Recommended)
image: "local:vztmpl/ubuntu-22.04-standard_22.04-1_amd64.tar.zst"
Advantages:
- ✅ Direct template usage (no import)
- ✅ Faster VM creation
- ✅ No lock issues
- ✅ Already in storage
Disadvantages:
- ❌ Standard Ubuntu (not cloud-init optimized)
- ❌ May need manual cloud-init setup
Option 2: Pre-import Cloud Image to local-lvm
# On Proxmox node
qm disk import <vmid> local:iso/ubuntu-22.04-cloud.img local-lvm vm-100-disk-0
Then use:
image: "local-lvm:vm-100-disk-0"
Advantages:
- ✅ Cloud-init ready
- ✅ Faster than importdisk during creation
Disadvantages:
- ❌ Requires manual pre-import
- ❌ Image tied to specific storage
Option 3: Fix Provider Code (Long-term)
- Add task monitoring for
importdisk - Wait for import completion before config updates
- Better lock management and timeout handling
Templates Requiring Update
High Priority (Currently Broken)
vm-100.yaml- Uses volid format, triggers importdisk
Medium Priority (May Have Issues)
All 28 templates using ubuntu-22.04-cloud:
- May fail if image not found in storage
- May timeout during storage search
Action Plan
Immediate
- ✅ VMs 100 and 101 removed
- ⏳ Update
vm-100.yamlto use template format - ⏳ Test VM creation with new format
- ⏳ Decide on image strategy for all templates
Short-term
- Review all templates
- Standardize image format
- Document image requirements
- Test VM creation workflow
Long-term
- Enhance provider code for importdisk handling
- Add image pre-import automation
- Create image management documentation
Verification Checklist
After template updates:
- VM creates successfully
- Disk is attached (
scsi0configured) - Boot order is set (
boot: order=scsi0) - Guest agent enabled (
agent: 1) - Cloud-init configured (
ide2present) - Network configured (
net0present) - VM can start and boot
- No lock issues
Related Documentation
docs/VM_TEMPLATE_IMAGE_ISSUE_ANALYSIS.md- Detailed technical analysiscrossplane-provider-proxmox/pkg/proxmox/client.go- Provider codeexamples/production/vm-100.yaml- Problematic templateexamples/production/basic-vm.yaml- Base template
Status: ✅ VMs REMOVED | ⚠️ TEMPLATES NEED UPDATE