No description
- Ruby 100%
- ansible/playbook.yml: prepare host as KVM hypervisor - ansible/test_vm.yml: create a Cirros test VM - chef/: equivalent Chef/Cinc cookbook - Both handle built-in KVM (no loadable modules needed) Co-authored-by: Shelley <shelley@exe.dev> |
||
|---|---|---|
| ansible | ||
| chef | ||
| README.md | ||
KVM Host Setup
Configuration management scripts to turn an exe.dev VM into a KVM hypervisor capable of running nested VMs.
Both Ansible and Chef versions are provided — they do the same thing.
What it does
- Installs KVM/QEMU and libvirt packages
- Verifies KVM hardware acceleration is available
- Enables and starts the
libvirtdservice - Adds the current user to
libvirtandkvmgroups - Runs
kvm-okto confirm everything works
Prerequisites
- Ubuntu 24.04 (exe.dev VM)
- CPU with nested virtualization enabled (
/dev/kvmmust exist)
Ansible
sudo apt install -y ansible
sudo ansible-playbook ansible/playbook.yml
Chef (Cinc)
curl -sL https://omnitruck.cinc.sh/install.sh | sudo bash -s -- -v 18
sudo chef-solo -c chef/solo.rb -o 'recipe[kvm_host]'
Creating a test VM
Both tools also include a recipe/playbook to spin up a small Cirros test VM:
# Ansible
sudo ansible-playbook ansible/test_vm.yml
# Chef
sudo chef-solo -c chef/solo.rb -o 'recipe[kvm_host::test_vm]'
SSH into the test VM with: ssh cirros@<IP> (password: gocubsgo)