[SOLVED] Nested Virtualization in Linux Container

mmhx

Member
Nov 26, 2021
15
1
8
33
Hi,

I was looking around and couldn't really find a definitive answer of whether it is possible or not to run another Hypervisor inside of a Linux Container (in Proxmox).

I provided a Linux Container environment to a coworker, and later in the project he was provided with a VirtualBox VM, and trying to run that inside the LXC obviously failed.
I solved this by converting the VB VM to qemu and hosting it on proxmox, and if more of this is needed I will migrate the LXC to a full VM.

But I'm interested in why it didn't work in the LXC.
Inside the LXC it doesn't look like I can enable hardware assissted virtualization extensions (AMD-V here).

I understand that LXC is using (part of) the host kernel, which obviously supports AMD-V. The VirtualBox error is talking about a VB Linux kernel driver not being loaded or set up correctly. Would it work if (in theory) those drivers would be added to the host kernel ? Or is there some other limitation ?
 
I was looking around and couldn't really find a definitive answer of whether it is possible or not to run another Hypervisor inside of a Linux Container (in Proxmox).
Even if you disable all security inside an LX(C) container, VirtualBox cannot run at the same as the kvm module is loaded. Therefore the only possibility is to enable nested KVM and run VirtualBox inside of KVM/QEMU.
 
ok, so we have incompatible kernel modules there basically
thank you for that answer!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!