No description
Find a file
exe.dev user 714e782268 KVM host setup: Ansible and Chef configs for nested VMs on exe.dev
- 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>
2026-06-08 11:31:12 +00:00
ansible KVM host setup: Ansible and Chef configs for nested VMs on exe.dev 2026-06-08 11:31:12 +00:00
chef KVM host setup: Ansible and Chef configs for nested VMs on exe.dev 2026-06-08 11:31:12 +00:00
README.md KVM host setup: Ansible and Chef configs for nested VMs on exe.dev 2026-06-08 11:31:12 +00:00

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

  1. Installs KVM/QEMU and libvirt packages
  2. Verifies KVM hardware acceleration is available
  3. Enables and starts the libvirtd service
  4. Adds the current user to libvirt and kvm groups
  5. Runs kvm-ok to confirm everything works

Prerequisites

  • Ubuntu 24.04 (exe.dev VM)
  • CPU with nested virtualization enabled (/dev/kvm must 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)