
vm-template-creation
by aiskillstore
Security-audited skills for Claude, Codex & Claude Code. One-click install, quality verified.
SKILL.md
name: vm-template-creation description: Create, configure, and manage VM templates in Proxmox. Build reusable VM images for rapid deployment of standardized environments, including Kubernetes clusters and managed applications.
VM Template Creation Skill
Create, manage, and deploy VM templates in your Proxmox environment for rapid, standardized infrastructure provisioning.
What this skill does
This skill enables you to:
- Prepare virtual machines from cloud images or custom configurations
- Convert configured VMs into templates for reuse
- Clone templates to create multiple instances
- Manage template configurations and updates
- Deploy standardized environments rapidly
- Maintain template consistency across deployments
- Create specialized templates for different workloads
- Update and version templates
- Manage template lifecycle
When to use this skill
Use this skill when you need to:
- Create template VMs for rapid deployment
- Prepare Ubuntu Cloud-Init compatible templates
- Deploy multiple identical VMs for Kubernetes clusters
- Build standardized application environments
- Automate VM provisioning workflows
- Maintain consistent infrastructure-as-code
- Support Infrastructure-as-Code (IaC) automation
- Create reusable templates for different projects
- Build CI/CD infrastructure templates
Available Tools
Core VM Management
create_vm_advanced- Create a VM with advanced configuration (disk, network, CD/DVD)update_vm_config- Update VM configuration and mark as templateget_vm_config- Get full VM configuration detailsclone_vm- Clone a template VM to create instancesdelete_vm- Remove a VM or template
Supporting Tools
get_vm_status- Get VM status and resource usageget_vms- List all VMs on a nodestart_vm- Start a VM (for testing/configuration)stop_vm- Stop a running VMshutdown_vm- Gracefully shut down a VM
Template VM Creation Workflow
Step 1: Prepare Base VM
Create a new VM with desired base configuration:
create_vm_advanced(
node_name="pve2",
vmid=100,
name="ubuntu-22.04-template",
memory=2048,
cores=2,
sockets=1,
ide2="local:iso/jammy-server-cloudimg-amd64.iso",
sata0="local-lvm:50", # 50GB disk
net0="virtio,bridge=vmbr0"
)
Step 2: Install and Configure OS
- Boot the VM with the Cloud-Init image
- Configure hostname, network, and storage
- Install required packages and applications
- Apply security patches and hardening
- Configure Cloud-Init for automation
- Test all functionality thoroughly
Step 3: Mark as Template
Once configuration is complete and tested:
update_vm_config(
node_name="pve2",
vmid=100,
config={
"template": 1
}
)
Important: Once a VM is marked as template, it cannot be started directly. It can only be cloned.
Step 4: Clone from Template
Create instances from the template:
clone_vm(
node_name="pve2",
source_vmid=100,
new_vmid=101,
new_name="web-server-01",
full=true
)
Real-World Example: Rancher Kubernetes Template
Create Ubuntu Template for RKE2
# 1. Create base VM
create_vm_advanced(
node_name="pve2",
vmid=100,
name="ubuntu-rke2-template",
memory=4096, # 4GB for control plane
cores=4,
sockets=1,
ide2="local:iso/jammy-server-cloudimg-amd64.iso",
sata0="local-lvm:100", # 100GB for system + RKE2
net0="virtio,bridge=vmbr0"
)
# 2. Boot, configure, and install:
# - OS configuration
# - Cloud-Init setup
# - RKE2 dependencies (curl, wget, etc.)
# - System optimization
# 3. Mark as template
update_vm_config(
node_name="pve2",
vmid=100,
config={"template": 1}
)
# 4. Clone for Rancher Manager cluster
clone_vm(
node_name="pve2",
source_vmid=100,
new_vmid=101,
new_name="rancher-manager-1",
full=true
)
clone_vm(
node_name="pve2",
source_vmid=100,
new_vmid=102,
new_name="rancher-manager-2",
full=true
)
clone_vm(
node_name="pve2",
source_vmid=100,
new_vmid=103,
new_name="rancher-manager-3",
full=true
)
# 5. Clone for NPRD-Apps cluster
clone_vm(
node_name="pve2",
source_vmid=100,
new_vmid=201,
new_name="nprd-apps-1",
full=true
)
clone_vm(
node_name="pve2",
source_vmid=100,
new_vmid=202,
new_name="nprd-apps-2",
full=true
)
clone_vm(
node_name="pve2",
source_vmid=100,
new_vmid=203,
new_name="nprd-apps-3",
full=true
)
Template Configuration Options
Common Configuration Parameters
When creating or updating templates, you can set:
template=1- Mark VM as template (prevents direct boot)cores=N- Number of CPU coressockets=N- Number of CPU socketsmemory=NNNN- Memory in MBsata0="storage:size"- Primary disknet0="virtio,bridge=vmbr0"- Network configurationide2="storage:iso/image.iso"- CD/DVD drive for installation
Cloud-Init Configuration
For Cloud-Init enabled templates:
- Set
cicustomparameter for custom Cloud-Init configs - Pre-stage user data for automatic configuration
- Use network metadata for DHCP or static IPs
- Enable serial console for debugging
Typical Workflows
Workflow: Create Standard Linux Template
- Create VM with base configuration
- Boot from Cloud-Init ISO
- Configure hostname, network, and disk
- Install base packages:
curl wget vim git - Apply security hardening
- Shutdown VM gracefully
- Mark as template with
update_vm_config - Clone as needed for deployments
Workflow: Update Existing Template
- Clone template to temporary VM
- Apply updates, patches, security fixes
- Test thoroughly
- Stop the test VM
- Create new template from test VM
- Delete old template and test VM
- Update documentation with version
Workflow: Kubernetes Cluster Deployment
- Create and test RKE2 template (steps above)
- Clone template 3 times for control plane nodes
- Clone template 3 times for worker nodes
- Boot cloned VMs
- Configure networking (hostname, IPs via Cloud-Init)
- Initialize RKE2 on control plane
- Join worker nodes to cluster
- Verify cluster health
Best Practices
Template Design
- Keep templates minimal (smaller disk = faster cloning)
- Pre-install common tools and dependencies
- Use Cloud-Init for network and host configuration
- Document template versions and purposes
- Include installation dates and applied patches
Security
- Keep templates patched and updated
- Remove sensitive data before templating
- Use strong default passwords during setup
- Enable SSH key-based authentication
- Disable unnecessary services
- Apply OS-level hardening
Performance
- Use virtio drivers for disks and network (better performance)
- Set appropriate memory/CPU for cloned VMs
- Use thin provisioning where possible
- Monitor template update frequency
Organization
- Use clear naming conventions:
distro-version-purpose - Document template contents and purpose
- Version templates systematically
- Maintain changelog for updates
- Remove old unused templates
- Tag templates with creation date
Testing
- Always test templates before deployment
- Boot cloned VMs to verify functionality
- Test network configuration with Cloud-Init
- Verify all installed packages work correctly
- Test scaling (clone multiple instances)
- Validate performance meets requirements
Example Questions
- "Create a template VM for Ubuntu 22.04 with RKE2"
- "Mark VM 100 as a template for reuse"
- "Clone template VM 100 to create 3 Kubernetes nodes"
- "What's the configuration of the Ubuntu template?"
- "Update the template to add Docker support"
- "Clone the template with custom hostname and IP"
- "Create a template for database servers"
- "Build a template for CI/CD runners"
Response Format
When using this skill, I provide:
- Clear step-by-step template creation instructions
- VM configuration commands ready to execute
- Cloning examples for your use case
- Configuration validation results
- Template status and details
- Recommendations for optimization
- Best practices guidance
Integration with Terraform
The MCP tools complement Terraform's telmate/proxmox provider:
- Use MCP to prepare and test templates interactively
- Use Terraform to clone templates at scale for production
- Use MCP to update template configurations
- Use MCP for troubleshooting template issues
- Combine for complete IaC automation
Limitations
- Templates cannot be booted directly (must be cloned)
- Large templates take longer to clone
- Network configuration happens post-clone via Cloud-Init
- Some fine-tuning may be needed per clone
- Disk image import requires manual steps (see Proxmox documentation)
Related Skills
- Virtual Machine Management - General VM lifecycle operations
- Cluster Management - Monitor Proxmox cluster health
- Disaster Recovery - Backup and restore templates
- Infrastructure as Code - Deploy with Terraform automation
Score
Total Score
Based on repository quality metrics
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
1ヶ月以内に更新
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
Reviews
Reviews coming soon
