VM Orchestration on KVM: How to Manage Resources and Start Firewalls Automatically

The Challenge
An Ubuntu server with KVM hosts several security VMs (Sophos, Palo Alto, WatchGuard). Before starting new instances, it is necessary to check if there are sufficient resources.
The goal was:
- Verify current CPU and RAM usage
- Identify available VMs
- Start firewall VMs based on free resources
The Prompt Sent to Myrmex
Using the integration with the Ubuntu server, we sent:
Check how much RAM and CPU is being used on @ANX-SRV-01 and based on what is left, start more VMs like Sophos and Palo Alto.
Note: By mentioning the server with
@ANX-SRV-01, Myrmex knows exactly which KVM host to check and which VMs to orchestrate.

What Myrmex Did
Myrmex analyzed the server resources and executed orchestration actions:
Resource Summary and Actions
| Item | Value / Status | Impact |
|---|---|---|
| CPU Usage | 2.29% (12 cores) | ✅ Low |
| RAM Memory | 8.3 GB / 15.3 GB (~54%) | ⚠️ Moderate |
| Sophos XG VM | Running (On) | ✅ Success |
| Palo Alto VM | Not Found | ❌ Pending |
| WatchGuard VM | Shut off (Available) | ℹ️ Suggestion |
Executed Actions
✅ Resource Analysis
Myrmex checked the current state of the hypervisor:
# Check CPU usage
top -bn1 | head -5
# Check memory usage
free -h
# List VMs and their states
virsh list --all
Result: CPU operating with ease (2.29%), RAM with ~7 GB available.
✅ Sophos VM Started
Myrmex identified that the sophos-xg VM was off and started it:
virsh start sophos-xg
Result: VM active, reserving 4 GB of RAM.
❌ Palo Alto VM Not Found
Myrmex searched for the VM in multiple locations:
# Search in XML definitions
ls /etc/libvirt/qemu/ | grep -i palo
# Search in disk images
ls /var/lib/libvirt/images/ | grep -i palo
Result: No .qcow2 file or XML definition found. Technical name of the VM needs confirmation.
ℹ️ Proactive Suggestion
Myrmex identified another available security VM:
"I noticed that WatchGuard FireboxV is available. Do you want me to start it too?"
Result
With the orchestration performed by Myrmex:
- ✅ Resources analyzed before starting VMs
- ✅ Sophos XG started automatically
- ✅ Residual capacity identified (~7 GB RAM)
- ✅ Proactive suggestion for additional VM
Prompt Variations
The same type of orchestration can be adapted:
To check status of all VMs:
List all VMs on @ANX-SRV-01 with their states, usage of CPU and RAM for each.
To create snapshot before maintenance:
Create a snapshot of all running VMs on @ANX-SRV-01 before kernel update.
To load balance between hosts:
Check resources of @ANX-SRV-01 and @ANX-SRV-02. Migrate idle VMs to the host with more free resources.
Want to manage your virtual environment intelligently? Try Myrmex and let AI orchestrate your VMs automatically.
