Nested virtualization is a feature that’s useful in some scenarios such as debugging hypervisors in a constrained environment and testing larger virtual deployments on a limited amount of physical resources. Nested virtualization is not recommended in production user environments, it is primarily intended for development and testing purposes. For Nested virtualization to work your XenServer/XCP-ng hosts needs to have virtualization extensions enabled.

$ cat /sys/hypervisor/properties/capabilities
xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64

In this guide we’ll show you how to enable nested virtualization on a Virtual Machine running in XenServer / XCP-ng Infrastructure. Follow these steps to enable, configure, and start using nested virtualization in Xen virtualization environment.

Enable Nested Virtualization using Xen Orchestra

Xen Orchestra is a user friendly administration tool for Xen Servers. It is designed to ease the administration time for your infrastructure. We can easily turn on Nested Virtualization for a Virtual Machine on Xen | XCP-ng Virtual Machine from Xen Orchestra console.

Login to Xen Orchestra Web interface.

Install Xen Orchestra Ubuntu Debian 01

If you don’t have Xen Orchestra check out our installation guide:

Select the Virtual Machine to enable Nested Virtualization from “Home” > “VMs” > “VM Name” and Stop the instance.

Enable Nested Virtualization Xen XCP ng 01

Then go to Advanced tab of the Virtual Machine.

Enable Nested Virtualization Xen XCP ng 02

Enable nested virtualization by toggling the switch to on.

Enable Nested Virtualization Xen XCP ng 03

When done, start the Virtual Machine to use the feature.

Enable Nested Virtualization Xen XCP ng 04

Login to the instance and confirm whether nested virtualization is available on your host system.

$ cat /sys/module/kvm_intel/parameters/nested
Y

If this command returns Y or 1, the feature is enabled.

More guides on XenServer and XCP-ng;

LEAVE A REPLY

Please enter your comment!
Please enter your name here