Proper testing ensures that scripts work reliably across different Proxmox VE environments and configurations. This guide covers testing strategies for both container and VM scripts.
Testing Environment
Requirements
Proxmox VE 8.0+ - Supported versions: 8.0-8.9, 9.0-9.1
Sufficient storage - At least 50GB free for testing
Network access - Internet connectivity for downloading packages
Test VM/Container IDs - Use high numbers (e.g., 900+) to avoid conflicts
Always test scripts in a non-production Proxmox environment first. Scripts create VMs/containers and can consume significant resources.
Testing Container Scripts
Basic Testing Workflow
Test default installation
Run the container script with default settings to verify basic functionality. bash -c "$( wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/docker.sh)"
Test advanced installation
Run the script and choose “Advanced” mode to test the 19-step wizard. bash -c "$( wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/docker.sh)"
# Select: Advanced Installation
# Verify all 19 configuration steps work
Verify container functionality
Access the container and verify the application works as expected. # Enter container
pct enter CTID
# Check service status
systemctl status appname
# Verify application responds
curl http://localhost:8080
Test update function
Run the update script to verify it can detect and apply updates. # From Proxmox host
bash -c "$( wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/docker.sh)"
# Script should detect existing container and offer update
Clean up
Remove the test container after successful testing. pct stop CTID
pct destroy CTID
Testing Install Scripts
Manual Testing
Since install scripts run inside containers, you need a running container to test them:
# Create a test container
pct create 999 /var/lib/vz/template/cache/debian-12-standard_12.7-1_amd64.tar.zst \
--hostname test-container \
--memory 2048 \
--cores 2 \
--rootfs local-lvm:8 \
--net0 name=eth0,bridge=vmbr0,ip=dhcp \
--unprivileged 1
# Start container
pct start 999
# Wait for container to boot
sleep 5
# Execute install script
pct exec 999 bash < install/docker-install.sh
# Verify installation
pct exec 999 systemctl status docker
# Clean up
pct stop 999
pct destroy 999
Testing with Different OS Versions
# Debian 12 (Bookworm)
var_os = "debian"
var_version = "12"
# Debian 13 (Trixie)
var_os = "debian"
var_version = "13"
# Ubuntu 22.04 LTS
var_os = "ubuntu"
var_version = "22.04"
# Ubuntu 24.04 LTS
var_os = "ubuntu"
var_version = "24.04"
# Alpine 3.20
var_os = "alpine"
var_version = "3.20"
# Alpine 3.21
var_os = "alpine"
var_version = "3.21"
Testing VM Scripts
Basic VM Testing
Run VM script
Execute the VM creation script with default settings. bash vm/haos-vm.sh
# Choose: Default Settings
Verify VM creation
Check that the VM was created successfully. # List VMs
qm list
# Check VM configuration
qm config VMID
# Monitor VM boot
qm terminal VMID
Test VM functionality
Access the VM and verify it boots and functions correctly. # Wait for VM to boot (30-60 seconds)
sleep 60
# Check VM status
qm status VMID
# Get VM IP (if QEMU guest agent is running)
qm guest cmd VMID network-get-interfaces
Clean up
Remove the test VM after successful testing. qm stop VMID
qm destroy VMID
Automated Testing
Test Script Template
#!/usr/bin/env bash
set -e
SCRIPT_NAME = "docker"
TEST_CTID = 999
echo "Testing ct/${ SCRIPT_NAME }.sh..."
# Cleanup function
cleanup () {
if pct status $TEST_CTID & > /dev/null; then
echo "Cleaning up test container..."
pct stop $TEST_CTID 2> /dev/null || true
pct destroy $TEST_CTID 2> /dev/null || true
fi
}
trap cleanup EXIT
# Run script with default settings (non-interactive)
echo "Running container creation..."
var_ctid = $TEST_CTID bash ct/ ${ SCRIPT_NAME } .sh << EOF
EOF
# Verify container was created
if ! pct status $TEST_CTID & > /dev/null; then
echo "FAIL: Container was not created"
exit 1
fi
echo "SUCCESS: Container created"
# Verify container is running
if ! pct status $TEST_CTID | grep -q "running" ; then
echo "FAIL: Container is not running"
exit 1
fi
echo "SUCCESS: Container is running"
# Enter container and verify service
if ! pct exec $TEST_CTID systemctl is-active docker & > /dev/null; then
echo "FAIL: Docker service is not running"
exit 1
fi
echo "SUCCESS: Docker service is running"
# Test update script
echo "Testing update function..."
var_ctid = $TEST_CTID bash ct/ ${ SCRIPT_NAME } .sh << EOF
EOF
echo "SUCCESS: All tests passed"
Running Automated Tests
# Make test script executable
chmod +x test-container-script.sh
# Run tests
./test-container-script.sh
Common Test Cases
Container Script Tests
Resource Limits
Privileged vs Unprivileged
Different OS Versions
# Test with minimal resources
var_cpu = "1" var_ram = "512" var_disk = "2" bash ct/app.sh
# Test with maximum resources
var_cpu = "8" var_ram = "8192" var_disk = "50" bash ct/app.sh
Install Script Tests
# Test verbose mode
VERBOSE = "yes" pct exec CTID bash < install/app-install.sh
# Test with custom variables
APP = "MyApp" RELEASE = "v1.2.3" pct exec CTID bash < install/app-install.sh
Update Function Tests
# Test update with existing version file
echo "v1.0.0" | pct push CTID - /opt/app_version.txt
var_ctid = CTID bash ct/app.sh # Should detect update available
# Test update when already latest
echo "v2.0.0" | pct push CTID - /opt/app_version.txt
var_ctid = CTID bash ct/app.sh # Should report no update needed
Validation Checklist
Before Submitting
Complete ALL items in this checklist before submitting a pull request.
Container Scripts (ct/)
Install Scripts (install/)
VM Scripts (vm/)
Debugging Failed Tests
Container Creation Fails
# Check Proxmox logs
tail -f /var/log/pve/tasks/active
# Check container creation logs
pct config CTID
# Check container console
pct console CTID
# Check container logs
pct exec CTID journalctl -xe
Service Won’t Start
# Check service status
pct exec CTID systemctl status appname
# Check service logs
pct exec CTID journalctl -u appname -n 50
# Check application logs
pct exec CTID cat /var/log/appname/error.log
Network Issues
# Check network configuration
pct config CTID | grep net0
# Test network from container
pct exec CTID ping -c 3 8.8.8.8
pct exec CTID curl -I https://google.com
# Check DNS
pct exec CTID cat /etc/resolv.conf
Update Function Fails
# Check version file
pct exec CTID cat /opt/app_version.txt
# Test GitHub API manually
curl -fsSL https://api.github.com/repos/user/repo/releases/latest
# Check update script logic
pct exec CTID bash -x < ct/app.sh # Run with debug mode
Resource Usage
# Monitor container resources
pct status CTID --verbose
# Check CPU usage
pct exec CTID top -bn1 | head -20
# Check memory usage
pct exec CTID free -h
# Check disk usage
pct exec CTID df -h
Load Testing
# Test application under load
ab -n 1000 -c 10 http://container-ip:8080/
# Monitor during load
watch -n 1 'pct status CTID --verbose'
Best Practices
DO:
Test on clean Proxmox installation - Avoid pre-configured environments
Use high container/VM IDs for testing - e.g., 900+ to avoid conflicts
Test all installation modes - Default, Advanced, User Defaults
Verify cleanup works - No leftover files, containers, or VMs
Test update function thoroughly - Both “update available” and “up to date” scenarios
Document any special requirements - GPU passthrough, kernel modules, etc.
Test on minimum supported Proxmox version - PVE 8.0+
DON’T:
Test in production environments
Skip advanced installation mode testing
Forget to test the update function
Leave test containers/VMs running
Assume it works on all OS versions without testing
Ignore error messages or warnings
Submit untested code
Continuous Integration
For maintainers, consider setting up automated testing:
.github/workflows/test-scripts.yml
name : Test Container Scripts
on :
pull_request :
paths :
- 'ct/**'
- 'install/**'
jobs :
test :
runs-on : self-hosted # Proxmox runner
steps :
- uses : actions/checkout@v3
- name : Test container creation
run : |
./tests/test-container-script.sh ${{ matrix.script }}
- name : Cleanup
if : always()
run : |
./tests/cleanup.sh
strategy :
matrix :
script :
- docker
- pihole
- homeassistant
Reporting Issues
When reporting test failures:
Proxmox version : pveversion
Script name and version : ct/app.sh or vm/os-vm.sh
Installation mode : Default/Advanced/etc.
Error messages : Full error output
Container/VM logs : journalctl -xe, systemctl status
Steps to reproduce : Exact commands used
Example issue report:
Title: Docker container creation fails on Proxmox 8.2
Environment:
- Proxmox VE: 8.2.1
- Script: ct/docker.sh
- Mode: Default installation
Error:
[Error message here]
Steps to reproduce:
1. Run: bash ct/docker.sh
2. Select: Default installation
3. Error occurs during Docker installation
Logs:
[Container logs here]