[SOLVED] Nested Virtualization in Linux Container

mmhx

Member
Nov 26, 2021
18
1
8
34
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!