This directory contains comprehensive test scripts for validating Proxmox MCP server functionality.
Tests all basic (non-elevated) read-only tools:
proxmox_get_nodes- List cluster nodesproxmox_get_cluster_status- Cluster statusproxmox_get_vms- List VMs/containersproxmox_get_vm_status- VM detailsproxmox_get_storage- Storage informationproxmox_get_next_vmid- Get next available VMIDproxmox_list_templates- List LXC templates
Usage:
node test-basic-tools.jsRequirements:
- Valid
.envconfiguration - Working Proxmox connection
- Does NOT require
PROXMOX_ALLOW_ELEVATED=true
Comprehensive workflow tests for complete lifecycle operations.
Usage:
# Run all workflows
node test-workflows.js
# Run specific workflow
node test-workflows.js --workflow=lxc
node test-workflows.js --workflow=vm
node test-workflows.js --workflow=network
node test-workflows.js --workflow=disk
node test-workflows.js --workflow=snapshot
node test-workflows.js --workflow=backup
# Dry-run mode (show what would be done)
node test-workflows.js --dry-run
# Interactive mode (confirm before destructive operations)
node test-workflows.js --interactive
# Skip cleanup (keep test resources)
node test-workflows.js --no-cleanup
# Combine options
node test-workflows.js --workflow=lxc --interactive --dry-runRequirements:
- Valid
.envconfiguration PROXMOX_ALLOW_ELEVATED=truein.env- API token with appropriate permissions:
VM.Allocate- Create VMs/containersVM.Config.Disk- Disk managementVM.Config.Network- Network managementVM.PowerMgmt- Start/stop/rebootVM.Snapshot- Snapshot operationsVM.Backup- Backup operationsDatastore.Allocate- Storage allocation
- Get next available VMID
- List available templates
- Create new LXC container
- Start container
- Check status
- Create snapshot
- List snapshots
- Stop container
- Delete snapshot
- Delete container (cleanup)
What it validates:
- Container creation with templates
- Lifecycle management (start/stop)
- Snapshot operations
- Status monitoring
- Resource cleanup
- Find existing VM
- Detect VM type (QEMU/LXC)
- Get detailed status
- Start (if stopped) or reboot (if running)
- Verify operations
What it validates:
- VM discovery
- Power management operations
- Status checking
- Type detection
- Find stopped VM
- Add network interface (net1, bridge vmbr0)
- Update interface (add rate limit)
- Remove interface
What it validates:
- Network interface addition
- Configuration updates
- Interface removal
- Bridge configuration
Note: VM must be stopped for network changes
- Find QEMU VM
- Add new disk (10G on local-lvm)
- Resize disk (+2G)
- Remove disk
What it validates:
- Disk allocation
- Disk resizing
- Disk removal
- Storage integration
Note: Primarily tests QEMU VMs for reliability
- Find VM
- Create snapshot
- List snapshots
- Delete snapshot
What it validates:
- Snapshot creation
- Snapshot listing
- Snapshot deletion
- Snapshot naming
- Find VM
- Create backup (to local storage)
- Wait for background job
- List backups
What it validates:
- Backup job creation
- Background job handling
- Backup listing
- Storage integration
Note: Backup restoration is not tested automatically (destructive operation)
0- All tests passed1- One or more tests failed or error occurred
The scripts provide detailed, color-coded output:
- 🟢 Green - Success
- 🔴 Red - Failure
- 🟡 Yellow - Warning
- 🔵 Blue - Information
- 🟣 Magenta - Headers
Example output:
═══════════════════════════════════════════════════════════════════
LXC Container Complete Workflow
═══════════════════════════════════════════════════════════════════
[12:34:56] ▶ Step 1: Get next available VMID
✓ Got VMID: 105
[12:34:57] ▶ Step 2: List available templates
Node: pve1
✓ Templates listed successfully
✓ Found template: local:vztmpl/debian-12-standard_12.2-1_amd64.tar.gz
[12:34:58] ▶ Step 3: Create LXC container
VMID: 105, Template: local:vztmpl/debian-12-standard_12.2-1_amd64.tar.gz
✓ Create Container: Container 105 created
By default, test-workflows.js automatically cleans up test resources (deletes created VMs/containers) at the end.
To keep test resources:
node test-workflows.js --no-cleanupManual cleanup: If a test fails or is interrupted, you may need to manually delete test resources:
- Container hostname:
test-mcp-{vmid} - Snapshots:
test-snapshotortest-snap-{timestamp}
Solution: Set PROXMOX_ALLOW_ELEVATED=true in your .env file
Solution: Download LXC templates via Proxmox UI: Storage → local → CT Templates → Download
Solution: Stop a VM first, or skip network workflow: --workflow=lxc
Solution:
- Check
.envconfiguration - Verify Proxmox API is accessible
- Check API token permissions
- Ensure firewall allows connection
Solution:
- Increase timeout values in script
- Check Proxmox performance
- Reduce concurrent operations
- Dry-run mode - Preview operations without executing
- Interactive mode - Confirm before destructive operations
- Resource tracking - Automatic cleanup of created resources
- Error handling - Graceful failure with detailed messages
- Status validation - Verify operations completed successfully
- Start with dry-run:
node test-workflows.js --dry-run - Test basic tools first:
node test-basic-tools.js - Run one workflow at a time initially:
--workflow=lxc - Use interactive mode for production:
--interactive - Review cleanup: Don't use
--no-cleanupunless debugging - Check permissions: Ensure API token has all required permissions
- Monitor Proxmox: Watch for resource usage during tests
These scripts can be integrated into CI/CD pipelines:
# Basic connectivity test
node test-basic-tools.js || exit 1
# Full workflow validation (non-interactive)
node test-workflows.js || exit 1
# Or specific workflow
node test-workflows.js --workflow=snapshot || exit 1When adding new workflows:
- Follow existing pattern (logStep, recordResult)
- Add cleanup tracking for new resources
- Include error handling
- Add to workflow list in main()
- Document in this README
Same as parent project (MIT)