This guide explains how to run the complete automated testing workflow for all supported Linux distributions.
The orchestration system automates:
- ISO downloads and verification
- QEMU VM creation
- OS installation (non-interactive)
- VM archiving
- Mail Server Factory testing
- Report generation
- Documentation updates
All processes run in the background with periodic status monitoring to prevent hangs.
# Start complete workflow in background
nohup ./scripts/master_orchestrator.sh all > orchestration.log 2>&1 &
# Monitor progress
./scripts/process_monitor.sh watch# Phase 1: Download ISOs
./scripts/master_orchestrator.sh download-isos
# Phase 2: Verify ISOs
./scripts/master_orchestrator.sh verify-isos
# Phase 3: Create VMs
./scripts/master_orchestrator.sh create-vms
# Phase 4: Monitor installations
./scripts/master_orchestrator.sh monitor-vms
# Phase 5: Archive VMs
./scripts/master_orchestrator.sh archive-vms
# Phase 6: Run tests
./scripts/master_orchestrator.sh test
# Phase 7: Generate reports
./scripts/master_orchestrator.sh report# Auto-refreshing dashboard (updates every 30 seconds)
./scripts/process_monitor.sh watch# Show all running processes
./scripts/process_monitor.sh status
# Show VM status
./scripts/process_monitor.sh vms
# Show downloaded ISOs
./scripts/process_monitor.sh isos
# Show test results
./scripts/process_monitor.sh tests
# Show everything
./scripts/process_monitor.sh all
# Show process logs
./scripts/process_monitor.sh logs# Master orchestration log
tail -f orchestration_logs/master_*.log
# ISO download log
tail -f orchestration_logs/iso_download.log
# VM creation logs
tail -f orchestration_logs/vm_create_*.log
# Test execution log
tail -f orchestration_logs/mail_tests.log
# Individual VM serial console
tail -f vms/ubuntu-22/serial.logIf a process hangs or gets stuck:
# Kill specific process
./scripts/process_monitor.sh kill iso_download
./scripts/process_monitor.sh kill vm_create_ubuntu-22
./scripts/process_monitor.sh kill mail_tests
# Find all running processes
ps aux | grep master_orchestrator
# Force kill orchestrator
pkill -9 -f master_orchestrator# If ISO download failed, retry
./scripts/master_orchestrator.sh download-isos
# If specific VM failed, recreate it
./scripts/qemu_manager.sh delete ubuntu-22
./scripts/qemu_manager.sh create ubuntu-22 4096 20G 2- Disk Space: 100GB free (for ISOs and VMs)
- RAM: 16GB (8GB allocated to VMs, 8GB for host)
- CPU: 4+ cores with hardware virtualization (Intel VT-x / AMD-V)
- Network: Broadband connection (for ISO downloads)
| Distribution | Memory | Disk | CPUs | Install Time |
|---|---|---|---|---|
| Ubuntu 22/24 | 4GB | 20GB | 2 | 10-15 min |
| Debian 11/12 | 4GB | 20GB | 2 | 15-20 min |
| Fedora 38-41 | 8GB | 40GB | 4 | 25-35 min |
| RHEL 9 | 8GB | 40GB | 4 | 30-40 min |
| AlmaLinux 9 | 8GB | 40GB | 4 | 25-35 min |
| Rocky Linux 9 | 8GB | 40GB | 4 | 25-35 min |
| openSUSE 15.6 | 8GB | 40GB | 4 | 30-45 min |
isos/ ~50GB (all distribution ISOs)
vms/ ~200GB (all VM disks)
vms/archive/ ~200GB (archived VMs)
test_results/ ~100MB (logs and reports)
orchestration_logs/ ~500MB (orchestration logs)
Total estimated time: 6-12 hours
| Phase | Duration | Notes |
|---|---|---|
| ISO Download | 1-3 hours | Depends on internet speed |
| ISO Verification | 5-10 minutes | Checksums validation |
| VM Creation | 5-10 minutes | Disk image creation |
| OS Installation | 3-6 hours | All VMs install in parallel |
| VM Archiving | 30-60 minutes | Compress VM images |
| Mail Server Tests | 2-4 hours | Sequential testing per VM |
| Report Generation | 5 minutes | Compile test results |
- Fast installs (Ubuntu, Debian): 15-20 minutes
- Medium installs (Fedora, AlmaLinux, Rocky): 30-40 minutes
- Slow installs (RHEL, openSUSE): 40-60 minutes
Symptoms: Process shows "Running" for longer than expected timeout
Resolution:
# Check which process is stuck
./scripts/process_monitor.sh status
# Kill the stuck process
./scripts/process_monitor.sh kill <process_name>
# Check logs for errors
cat orchestration_logs/<process_name>.log
# Restart the specific phase
./scripts/master_orchestrator.sh <phase-name>Symptoms: ISO download process fails or times out
Resolution:
# Check download status
./scripts/iso_manager.sh list
# Retry download for specific ISO
./scripts/iso_manager.sh download
# Download single ISO manually
cd isos
wget <iso-url>
sha256sum -c <checksum-file>Symptoms: VM fails to create or start
Resolution:
# Check QEMU installation
which qemu-system-x86_64
qemu-system-x86_64 --version
# Check hardware virtualization
egrep -c '(vmx|svm)' /proc/cpuinfo # Should be > 0
# Delete and recreate VM
./scripts/qemu_manager.sh delete <distro>
./scripts/qemu_manager.sh create <distro> <memory> <disk> <cpus>
# Check VM logs
cat vms/<distro>/creation.log
cat vms/logs/<distro>_*.logSymptoms: VM stuck during OS installation
Resolution:
# Check serial console output
tail -100 vms/<distro>/serial.log
# Check if VM is consuming CPU
top | grep qemu
# Check preseed/kickstart configuration
cat preseeds/<distro>-*.cfg
# Restart VM installation
./scripts/qemu_manager.sh stop <distro>
./scripts/qemu_manager.sh delete <distro>
./scripts/qemu_manager.sh create <distro> <memory> <disk> <cpus>Symptoms: Mail Server Factory tests fail on specific distribution
Resolution:
# Check test logs
cat test_results/<distro>_*.log
# SSH into VM to debug
ssh mailtest@<distro>.local # Password: WhiteSnake8587
# Check Docker on VM
ssh mailtest@<distro>.local "docker ps -a"
# Manually run Mail Server Factory on VM
./mail_factory Examples/<Distribution>.jsonSymptoms: Process fails with "No space left on device"
Resolution:
# Check disk usage
df -h .
du -sh isos/ vms/ vms/archive/
# Clean up old archives
rm -rf vms/archive/*
# Delete old test results
rm -rf test_results/*
# Delete ISOs after VMs are created
rm -rf isos/*.isoEach process has a maximum execution time:
- ISO Download: 2 hours
- VM Creation: 1 hour per VM
- VM Installation: 90 minutes per VM
- Mail Server Tests: 2 hours total
If a process exceeds its timeout, it is automatically killed.
The orchestrator checks process status every 30 seconds:
- Verifies process is running
- Checks elapsed time vs. timeout
- Kills process if timeout exceeded
- Logs all activities
The orchestrator handles signals properly:
# Send SIGTERM for graceful shutdown
kill -TERM <orchestrator-pid>
# Wait 10 seconds, then force kill if needed
kill -KILL <orchestrator-pid>When orchestrator exits (normal or error):
- All child processes are killed
- PID files are removed
- Logs are finalized
- Temporary files are cleaned
Mail-Server-Factory/
├── scripts/
│ ├── master_orchestrator.sh # Main orchestration script
│ ├── process_monitor.sh # Status monitoring
│ ├── iso_manager.sh # ISO download/verify
│ ├── qemu_manager.sh # VM lifecycle
│ └── test_all_distributions.sh # Testing script
├── preseeds/ # Auto-install configs
├── isos/ # Downloaded ISOs
├── vms/ # VM images
│ ├── <distro>/ # Per-VM directory
│ │ ├── disk.qcow2 # VM disk
│ │ ├── vm.pid # QEMU PID
│ │ └── serial.log # Console output
│ ├── archive/ # Archived VMs
│ └── logs/ # VM creation logs
├── orchestration_logs/ # Orchestration logs
│ ├── master_*.log # Master log
│ ├── pids/ # Process PIDs
│ └── status.json # Status file
└── test_results/ # Test reports
├── test_results_*.md # Markdown reports
└── test_results_*.json # JSON reports
- Check disk space:
df -h .(ensure 100GB+ free) - Check internet:
ping -c 5 google.com - Check hardware virtualization:
egrep -c '(vmx|svm)' /proc/cpuinfo - Check QEMU:
qemu-system-x86_64 --version - Check Docker:
docker --version
- Monitor regularly: Use watch mode or check every 30-60 minutes
- Review logs: Check for errors or warnings
- Watch resources: Monitor CPU, memory, disk usage
- Be patient: Full workflow takes 6-12 hours
- Review test results: Check
test_results/directory - Archive VMs: VMs are in
vms/archive/for reuse - Clean up: Delete ISOs if disk space is limited
- Update documentation: Review and update README/TESTING.md
If issues persist:
- Check logs: Review all logs in
orchestration_logs/ - Check VM logs: Review
vms/<distro>/serial.log - Manual testing: Try manual VM creation and testing
- Report issues: Document errors with logs for troubleshooting
# Start orchestration
nohup ./scripts/master_orchestrator.sh all > orch.log 2>&1 &
echo $! > orchestrator.pid
# Check status periodically
watch -n 60 './scripts/process_monitor.sh all'
# Or monitor specific things
./scripts/process_monitor.sh vms
./scripts/process_monitor.sh status
./scripts/process_monitor.sh isos
# If needed, kill orchestrator
kill $(cat orchestrator.pid)# Day 1: Download ISOs
./scripts/master_orchestrator.sh download-isos
# Day 2: Create VMs and install
./scripts/master_orchestrator.sh create-vms
./scripts/master_orchestrator.sh monitor-vms
# Day 3: Archive and test
./scripts/master_orchestrator.sh archive-vms
./scripts/master_orchestrator.sh test
# Day 4: Generate reports
./scripts/master_orchestrator.sh report# Test just Ubuntu 22.04
./scripts/iso_manager.sh download # Gets all ISOs
./scripts/qemu_manager.sh create ubuntu-22 4096 20G 2
# Wait for installation...
./scripts/test_all_distributions.sh single Ubuntu_22The orchestration is successful when:
✅ All 12 ISOs downloaded and verified
✅ All 12 VMs created successfully
✅ All OS installations completed (login prompt visible)
✅ All VMs archived to vms/archive/
✅ All Mail Server Factory tests passed
✅ Test reports generated in test_results/
✅ No processes stuck or hanging
✅ All logs show "SUCCESS" for critical operations
After successful orchestration:
- Review test reports in
test_results/ - Update
TESTING.mdwith latest results - Update
README.mdwith distribution compatibility - Update website with test results
- Create GitHub release with tested VMs
- Document any distribution-specific issues
- Plan for continuous testing integration