QEMU-based test harness for expunge-bootable ISO development.
This repo contains scripts and configuration for automated testing of Expunge bootable ISOs using QEMU/KVM virtual machines with simulated drives.
- QEMU with KVM support
- User in
kvmgroup (or usesg kvm -cwrapper) - SSH client with
sshpassfor automated login - Virtual disk images in
drives/directory
Create virtual drives for testing:
# Create drives directory
mkdir -p drives
# Create virtual SATA drives (sparse, use minimal space)
qemu-img create -f qcow2 drives/sata1.qcow2 100G
qemu-img create -f qcow2 drives/sata2.qcow2 100G
# Create virtual NVMe drive
qemu-img create -f qcow2 drives/nvme1.qcow2 250GInteractive QEMU launcher with SSH access for manual testing.
./test-iso.sh /path/to/expunge-live.isoFeatures:
- Boots ISO with SATA and NVMe virtual drives
- SSH port forwarded to localhost:2222
- Serial console output to terminal
- Uses
-nographicfor headless operation
Automated wipe flow test that:
- Boots the ISO
- Connects via SSH
- Selects a drive for wiping
- Starts a wipe operation
- Monitors progress
- Reports results
./test-wipe-flow.sh /path/to/expunge-live.isoexpunge-testing/
├── drives/ # Virtual disk images (gitignored)
│ ├── sata1.qcow2
│ ├── sata2.qcow2
│ └── nvme1.qcow2
├── logs/ # Test output logs (gitignored)
├── test-iso.sh # Interactive test launcher
├── test-wipe-flow.sh # Automated wipe test
└── README.md
If you get "permission denied" for /dev/kvm, either:
- Add user to kvm group:
sudo usermod -aG kvm $USER(requires re-login) - Use sg wrapper:
sg kvm -c './test-iso.sh ...'
The Expunge ISO generates a random root password at build time. The password is displayed on the console during boot and written to /etc/issue.
For automated testing, the scripts extract the password from boot output.
Scripts use -nographic -serial mon:stdio for serial console access, which works well for:
- Headless servers
- CI/CD pipelines
- Remote development
- expunge-bootable - The bootable ISO
- expunge-platform - Cloud platform