This episode covers running Cloud Hypervisor in the public cloud: nested virtualization on AWS EC2 (C8i/M8i/R8i classes since February 2026) that enables KVM on regular instances, plus deployments on bare-metal/on-prem and edge nodes. You'll learn to build microVM CI/CD without bare-metal.

So far we've assumed your host is bare-metal you fully control. But what if you want to run Cloud Hypervisor in the public cloud — where the "host" itself is already a VM? The answer is nested virtualization: running a hypervisor (KVM) inside a VM provided by the cloud provider.
This changes the game. Previously, microVM CI/CD or a Kata Containers cluster needed bare-metal — expensive and inflexible. With nested virtualization on AWS EC2 (and other providers), you can build a microVM platform on regular instances that scales with demand.
AWS officially supports nested virtualization on certain instance classes — including C8i, M8i, and R8i (and similar classes) since February 2026. This means these instances expose the virtualization flags (vmx/svm) to the guest, so inside the instance you can:
/dev/kvm available).Verify that your instance supports nested virtualization:
grep -cE "(vmx|svm)" /proc/cpuinfo
ls -l /dev/kvmIf /dev/kvm isn't there, load its module:
sudo modprobe kvm_intel # atau kvm_amd untuk AMD
ls -l /dev/kvmImportant
Not every EC2 instance supports nested virtualization, and support can depend on the instance's virtualization type (Nitro vs. earlier classes). Always verify grep -cE "(vmx|svm)" /proc/cpuinfo — if the result is zero, use an allowed instance class or bare-metal (the .metal classes).
The most interesting scenario: microVM CI/CD runners. Instead of runners that share the host kernel, each job runs in its own Cloud Hypervisor VM — full isolation, with no VM "stickiness" between jobs.
cloud-hypervisor \
--kernel kernel-vmlinux \
--disk path=job.raw \
--cpus boot=2 \
--memory size=1G \
--net tap=ci0,ip=172.16.0.1,mac=a8:21:95:80:00:99 \
--cmdline "console=ttyS0 root=/dev/vda1 rw"With this pattern, a single C8i instance can run a dozen parallel CI microVMs — replacing the need for bare-metal in such workloads. Cloud Hypervisor's boot speed (episode 16) is the key: jobs start in seconds.
Nested virtualization has a cost: layered virtualization adds overhead. Measure with benchmarks (episode 16) how much performance you can reach, and watch metrics like CPU steal time:
top -b -n1 | grep -E "steal|wa"High steal indicates the physical host above you is busy too — consider a larger instance or a different class.
Nested virtualization isn't free and has limits. For workloads that need deterministic performance — HPC, heavy I/O workloads, or VFIO passthrough that needs direct hardware (episode 8) — bare-metal remains the primary choice:
/dev/kvm and no extra virtualization layer.sudo ip link add br0 type bridge
sudo ip link set eno1 master br0
cloud-hypervisor \
--kernel kernel-vmlinux \
--disk path=prod.raw \
--net tap=prod0,ip=10.0.0.1,mac=a8:21:95:80:00:11 \
--cpus boot=8 \
--memory size=16GAt the edge — devices with limited resources and unstable networks — Cloud Hypervisor offers two valuable things:
A common pattern: an edge node runs Cloud Hypervisor with a small image and immutable workloads, managed centrally:
cloud-hypervisor \
--kernel kernel-vmlinux \
--disk path=edge.raw,readonly=on \
--cpus boot=1 \
--memory size=512M \
--cmdline "console=ttyS0 root=/dev/vda1 ro quiet"readonly=on and ro make the edge image immutable — every reboot returns to its original state, reducing drift and persistent-compromise risk.
For production, combine these patterns:
Cloud publik (EC2 nested) → CI/CD microVM, Kata cluster
Bare-metal / on-prem → workload deterministik, VFIO, HPC
Edge nodes → microVM immutable, footprint kecilTip
Start in the public cloud to try things out, then move to bare-metal when deterministic performance and isolation become requirements — not the other way around. Nested virtualization is a cheap entry point to understanding Cloud Hypervisor before investing in your own hardware.
/dev/kvm missing: check the instance class, or load the kvm module.Key takeaways:
In the next episode, episode 20, we'll refine performance & observability — hugepages, CPU pinning/affinity, NUMA awareness, then VMM logs, metrics, tracing, and debugging with gdb. From "a running VM" toward "a measured and optimized VM".