
Virtualization has become a cornerstone of modern computing, enabling developers, gamers, and businesses to run multiple operating systems on a single physical machine. One common requirement is enabling Nested Virtualization (VT) on a VPS, especially when running applications like BlueStacks or other emulators that require virtualization support.
If you are using SolusVM 2, the process to enable nested virtualization is slightly different compared to older SolusVM versions. In this guide, we’ll walk you through step-by-step instructions, share troubleshooting tips, and explain how to verify if nested virtualization is enabled successfully.
What is Nested Virtualization?
Nested Virtualization allows you to run a virtual machine inside another virtual machine. For example, if you’re hosting a Windows VM on a KVM-based VPS, enabling VT will let you run additional virtualization software such as BlueStacks, VirtualBox, or Android Emulators inside that VM.
Without enabling nested virtualization, you may encounter errors such as:
- VT not enabled
- Unsupported configuration errors
- Emulator crashes on startup
Steps to Enable Nested Virtualization on SolusVM 2
Here is the procedure you can follow on your compute node (host machine):
1. Connect to Compute Resource via SSH
Log in to the compute resource (your VPS host node) via SSH:
ssh root@your-server-ip
2. Configure KVM Nested Virtualization
Create the following file:
nano /etc/modprobe.d/kvm-nested.conf
For Intel processors, add:
options kvm_intel nested=1
For AMD processors, use:
options kvm_amd nested=1
Save and exit the file.
3. Reboot the Compute Node
Reboot the physical node to apply the changes:
reboot
4. Verify Nested Virtualization
After rebooting, confirm if nested virtualization is active:
cat /sys/module/kvm_intel/parameters/nested
If enabled, it should return:
Y
For AMD:
cat /sys/module/kvm_amd/parameters/nested
Troubleshooting Common Errors
Sometimes, enabling nested virtualization can cause VM boot issues. Here are solutions to common problems:
Error: “Unsupported configuration: Security driver model ‘selinux’ is not available”
This happens when SELinux labeling conflicts with KVM.
Fix:
Edit the VPS configuration:
virsh edit <VM-UUID>
Change this line:
<seclabel type='none' model='selinux'/>
To:
<seclabel type='none' model='none'/>
Save and restart the VM.
VM Fails to Boot After Enabling Nested Virtualization
If the VM does not boot, check the default configuration file:
nano /etc/modprobe.d/kvm.conf
Uncomment the relevant section for your CPU:
# For Intel
options kvm_intel nested=1
# For AMD
# options kvm_amd nested=1
Reboot and test again.
Running BlueStacks or Android Emulators on VPS
Once nested virtualization is enabled, you can install and run BlueStacks or other Android emulators inside your VM without encountering the “VT not enabled” error. This is particularly useful if you’re setting up a cloud gaming server, Android development environment, or automated emulator testing platform.
Best Practices
- Always verify that hardware virtualization (VT-x / AMD-V) is enabled on your host node BIOS.
- Use the correct configuration file (
kvm.conf
orkvm-nested.conf
) depending on your server setup. - Avoid making unnecessary changes if the VPS is already working fine.
- For production environments, test changes on a staging VM before applying them on live services.
Reference
For more details, you can also check the official SolusVM documentation (though it is not as comprehensive as the step-by-step guide we provided here):
SolusVM Official Guide – How to Enable Nested Virtualization