Enable Nested Virtualization on Xen | XCP-ng Virtual Machine

Posted on 93 views

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 on Xen | XCP-ng Virtual Machine 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-1024x291

Then go to Advanced tab of the Virtual Machine.

Enable-Nested-Virtualization-Xen-XCP-ng-02-1024x173

Enable nested virtualization by toggling the switch to on.

Enable-Nested-Virtualization-Xen-XCP-ng-03-1024x325

Once done boot the VM machine.

Enable-Nested-Virtualization-Xen-XCP-ng-04-1024x136

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.

coffee

Gravatar Image
A systems engineer with excellent skills in systems administration, cloud computing, systems deployment, virtualization, containers, and a certified ethical hacker.