https://github.com/muthukumar-subramaniam/server-hub
A QEMU/KVM-based automation lab for end-to-end VM provisioning that manages the complete lifecycle of virtual machines, with multi-distribution support, providing a powerful environment for learning, testing, and experimenting with Linux-based technologies.
https://github.com/muthukumar-subramaniam/server-hub
build-automation development devops homelab-automation kubernetes lab-automation linux linux-server opensuse os-provisioning platform-engineering qemu qemu-kvm rhel testing ubuntu virtualization vm-automation vm-provisioning
Last synced: 2 days ago
JSON representation
A QEMU/KVM-based automation lab for end-to-end VM provisioning that manages the complete lifecycle of virtual machines, with multi-distribution support, providing a powerful environment for learning, testing, and experimenting with Linux-based technologies.
- Host: GitHub
- URL: https://github.com/muthukumar-subramaniam/server-hub
- Owner: Muthukumar-Subramaniam
- License: gpl-3.0
- Created: 2025-05-25T19:17:44.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2026-01-18T01:15:16.000Z (9 days ago)
- Last Synced: 2026-01-18T18:37:26.726Z (8 days ago)
- Topics: build-automation, development, devops, homelab-automation, kubernetes, lab-automation, linux, linux-server, opensuse, os-provisioning, platform-engineering, qemu, qemu-kvm, rhel, testing, ubuntu, virtualization, vm-automation, vm-provisioning
- Language: Shell
- Homepage:
- Size: 16.6 MB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# ๐ Server-Hub: Build Your Own QEMU/KVM Virtual Home Lab
[](https://github.com/Muthukumar-Subramaniam/server-hub/releases/latest)
Transform your Linux workstation into a powerful, automated virtual datacenter! This project allows you to build and manage a virtual home lab, making it easy to deploy, break, and rebuild Linux VMs effortlessly. It automates VM provisioning, manages the complete lifecycle of your VMs, and provides a flexible environment for learning, testing, and experimenting with Linux-based technologies.
Although many open-source alternatives exist, I built this project for the fun of creating something of my own and sharing it with anyone with similar interests.
> โ ๏ธ **DISCLAIMER:** This project is intended for **testing**, **development**, and **experimentation** purposes only.
---
## ๐ฏ What You'll Get
- ๐ **Automated VM provisioning** via PXE boot & golden images
- ๐ **Dynamic DNS management** for your local domain
- ๐ง **Full infrastructure-as-code** automation
- ๐ป **Professional datacenter experience** on your workstation
- ๐ฎ **Complete VM lifecycle management** with enterprise-grade tools
- ๐งช **Experiment freely** โ Spin up and destroy VMs in seconds
---
## ๐ฅ๏ธ Automated Lab Environment for Provisioning and Managing Linux VMs
### ๐ง Central Infra Server VM's OS
The central lab infrastructure server VM is designed to run on **AlmaLinux 10** by default, providing all the essential services for managing the lab environment.
### ๐ฆ VM Guest OS Provisioning
The lab infrastructure server centrally manages all guest VM provisioning using automation scripts and configuration templates.
The toolkits provide automated VM provisioning for all three major Linux families, including ready-to-use configurations for:
| Distro Family | Supported OSes | Provisioning Method | Status |
|------------------|-----------------------------------------------|-------------------------------|--------------------------|
| Red Hat-based | AlmaLinux | Kickstart | โ
Included by default |
| | Rocky, Oracle Linux, RHEL, CentOS Stream | Kickstart | ๐ง Customizable |
| Debian-based | Ubuntu LTS | Cloud-init (`cloud-config`) | ๐ง Customizable |
| SUSE-based | openSUSE Leap | AutoYaST | ๐ง Customizable |
---
## ๐งพ Minimum System Requirements
> These are the minimum recommended values. You can adjust them later based on your specific use case and workload.
### ๐น Central Infra Server VM
- ๐ง **Memory**: 2 GB RAM
- โ๏ธ **CPU**: 2 vCPUs
- ๐พ **Storage**: 30 GB
### ๐ธ Provisioned VMs
- ๐ง **Memory**: 2 GB RAM
- โ๏ธ **CPU**: 2 vCPUs
- ๐พ **Storage**: 20 GB
---
## ๐ฅ Quick Start: Get Up and Running in 5 Steps
### Step 1 โ Download the Latest Release
[](https://github.com/Muthukumar-Subramaniam/server-hub/releases/latest)
```bash
sudo mkdir -p /server-hub
sudo chown ${USER}:$(id -g) /server-hub
curl -sSL https://github.com/Muthukumar-Subramaniam/server-hub/releases/latest/download/server-hub.tar.gz | tar -xzv -C /server-hub
cd /server-hub/qemu-kvm-manage/
```
> ๐ฆ **Using Latest Release**: This downloads the latest stable release directly from GitHub.
**Alternative - Clone from the Repository:**
If you prefer to use the latest code from the repository:
```bash
sudo mkdir -p /server-hub
sudo chown ${USER}:$(id -g) /server-hub
git clone https://github.com/Muthukumar-Subramaniam/server-hub.git /server-hub
cd /server-hub/qemu-kvm-manage/
```
---
### Step 2 โ Install QEMU/KVM
Run the automated setup script to configure your virtualization environment:
```bash
./setup-qemu-kvm.sh
```
This will install and configure all necessary packages and dependencies.
---
### Step 3 โ Download AlmaLinux ISO
Grab the latest AlmaLinux ISO for your lab infrastructure:
```bash
./download-almalinux-latest.sh
```
> โ **Pro tip:** This might take a few minutes depending on your network speed. Perfect time for a coffee break!
---
### Step 4 โ Deploy Your Lab Infrastructure Server
Now comes the magic! This fully automated script will:
- โจ Guide you through the setup with interactive prompts
- ๐ Install and configure the centralized lab infrastructure server
- ๐๏ธ Set up DNS, DHCP, PXE boot, and web services
- ๐ค Run Ansible automation for consistent configuration
```bash
./deploy-lab-infra-server.sh
```
**What to expect:**
- **First Reboot:** After OS installation and initial configuration
- **Second Reboot:** After services are configured via Ansible playbook
- **Final Step:** Once you see the login prompt, press `Ctrl + ]` to exit the console
> ๐ฌ Sit back and watch the automation work its magic!
---
### Step 5 โ Access Your Infrastructure Server
Time to explore! SSH into your newly deployed infrastructure server:
```bash
ssh lab-infra-server.lab.local
```
> ๐ก Replace `lab-infra-server.lab.local` with your actual server name and domain if different.
---
# โ
Your Lab is Ready! Time to Build Something Amazing! ๐
---
## ๐ ๏ธ Your New Superpowers: VM Management Tools
Your workstation is now equipped with powerful lab management tools:
### ๐ฆ VM Deployment & Management
```bash
qlabvmctl build-golden-image # ๐จ Create reusable golden base images
qlabvmctl install-golden # ๐ Deploy VMs instantly from golden images
qlabvmctl install-pxe # ๐ Deploy VMs via network PXE boot
qlabvmctl reimage-golden # ๐ Reinstall VMs from golden images
qlabvmctl reimage-pxe # ๐ Reinstall VMs via PXE boot
```
### ๐ฎ VM Operations
```bash
qlabvmctl list # ๐ View all VMs and their status
qlabvmctl info # โน๏ธ Display detailed VM information
qlabvmctl console # ๐ฅ๏ธ Connect to VM serial console
qlabvmctl start # โถ๏ธ Power on VMs
qlabvmctl stop # โน๏ธ Force power-off VMs
qlabvmctl shutdown # ๐ฝ Graceful VM shutdown
qlabvmctl restart # ๐ Hard restart VMs
qlabvmctl reboot # ๐ Graceful VM reboot
qlabvmctl remove # ๐๏ธ Delete VMs completely
```
### ๐ง VM Configuration
```bash
qlabvmctl resize # ๐ Resize memory, CPU, or disk
qlabvmctl disk-add # ๐พ Add new storage disks to VM
qlabvmctl disk-resize # ๐ Resize additional disks
qlabvmctl disk-attach # ๐ Attach disks from detached storage
qlabvmctl disk-detach # ๐ค Detach and save disks for later use
qlabvmctl disk-delete # ๐๏ธ Permanently delete detached disks
qlabvmctl nic-add # ๐ Add network interfaces to VM
qlabvmctl nic-remove # โ Remove network interfaces from VM
```
### ๐ Network Management
```bash
qlabvmctl ipv6-route # ๐ฃ๏ธ Manage IPv6 default routes (enable/disable/auto/status)
```
### ๐ Infrastructure Management
```bash
qlabstart # ๐ Start the entire lab infrastructure
qlabhealth # ๐ฅ Check lab infrastructure health
qlabdnsbinder # ๐ Manage local DNS records
```
**Pro tips:**
- Use `qlabvmctl --help` or `qlabvmctl --help` for VM management help
---
## ๐ญ The Secret Sauce: Backend Automation Tools
These powerful tools run on your infrastructure server, making everything work seamlessly:
- **๐ dnsbinder** โ Automatically manages DNS records for your local domain as you create/destroy VMs
- **โก ksmanager** โ Handles iPXE & golden-image based OS provisioning using kickstart automation
- **๐ฆ prepare-distro-for-ksmanager** โ Downloads and prepares multiple Linux distributions (AlmaLinux, Rocky, Ubuntu, openSUSE, and more!)
---
## ๐ Congratulations! Welcome to Your Virtual Datacenter!
You've just built a **professional-grade, fully automated home lab** that rivals enterprise infrastructure!
### ๐ What Can You Do Now?
- ๐งช **Experiment freely** โ Spin up and destroy VMs in seconds
- ๐ **Learn by doing** โ Practice DevOps, automation, and infrastructure management
- ๐ข **Simulate production** โ Test multi-tier applications in realistic environments
- ๐ **Develop skills** โ Master tools used in real enterprise datacenters
- ๐ฌ **Test and break things** โ Build, destroy, rebuild without fear
**Your journey to infrastructure mastery starts here!** ๐งโ๐ป๐ฅ๏ธ๐ง
---
## ๐ฌ Support & Contributing
- **Need help?** Found a bug? Have ideas? [Open an issue](https://github.com/Muthukumar-Subramaniam/server-hub/issues) on GitHub!
- **Want to contribute?** Pull requests are welcome! Feel free to improve the automation, add new distros, or enhance documentation.
---
## ๐ License
This project is open source. See the [LICENSE](LICENSE) file for details.
---
**Built with โค๏ธ for the home lab community**