Nested virtualization passes the CPU's virtualization extensions through to your server, so you can run virtual machines inside it: KVM and libvirt, Proxmox VE, Hyper-V, Android emulators, or throwaway sandboxes for testing.
Requirements and price
- Plans with 8 GB of memory or more. That means Cloud VPS and High Frequency from 8 GB, and every GPU plan.
- +11% of the plan price. The surcharge is included in the price shown in the deploy summary and on the server's page.
- Chosen at deploy. There is no switch for a server that already runs. To add it later, deploy a new server with the option on and move your workload.
- Kept on resize. When you move to a bigger plan, the 11% applies to the new price (Resize a server to a bigger plan).
Turn it on
- Open the deploy form. In step 1 Server, choose a plan with 8 GB or more.
- Switch on Nested virtualization. On smaller plans the switch is greyed out.
- Check the Summary: the plan name ends with "+ nested" and the price includes the surcharge.
- Finish the form and click Deploy now (Deploy your first server).
On the server's Overview tab, the Plan line then ends with "nested virtualization". Through the API, add "nested": true to the body of POST /api/v1/servers (API reference).
If you see "Nested virtualization needs a plan with 8 GB of memory or more.", pick a bigger plan or turn the switch off.
Check that it works on Linux
Cloud VPS and GPU servers run on AMD EPYC, High Frequency servers on AMD Ryzen. AMD's virtualization extension shows up as the svm CPU flag:
grep -c svm /proc/cpuinfo # a number above 0 means the flag is there
lscpu | grep -i virtualization # should print AMD-V
ls -l /dev/kvm # present once the kvm modules are loaded
On Ubuntu and Debian, apt install cpu-checker followed by kvm-ok gives a plain yes or no. To start with KVM and libvirt:
apt install qemu-system-x86 libvirt-daemon-system virtinst
virsh list --all
Turn on Hyper-V on Windows
In PowerShell run as administrator, on Windows Server:
Install-WindowsFeature -Name Hyper-V -IncludeManagementTools -Restart
On Windows 10 or 11 Pro and Enterprise:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
Windows desktop images need your own license key (Connect to a Windows server with Remote Desktop).
Plan your guests
- Guests share the server's vCPU, memory and disk. Leave enough for the host itself and size the plan with your guests in mind: memory is usually the first limit you hit.
- Your server has one public IPv4 address and one IPv6 address. Guests usually reach the internet through NAT on the host, which is how the default libvirt network works.
- Nested guests run slower than the host, most of all on disk-heavy work. Measure before you commit a production workload.
- Take a snapshot of the host once it is set up, before you start experimenting (Take a snapshot).
- What runs in your guests follows the same rules as the server itself (What you can run on CloudSat).