Ever needed to spin up multiple Ubuntu VMs quickly for testing, development, or learning? In this post, I'll walk you through a bash script that automates the entire process using libvirt/KVM and cloud-init.
- Downloads the official Ubuntu Noble cloud image automatically
- Creates multiple VMs with customizable resources (memory, CPUs, disk)
- Configures static IPs in the 192.168.122.2-254 range
- Sets up SSH access via your GitHub public keys