It is possible to run virtual machines (VMs) inside other VMs. That is called nested virtualization: 
Nested virtualization refers to virtualization that runs inside an already virtualized environment. In other words, it's the ability to run a hypervisor inside of a virtual machine (VM), which itself runs on a hypervisor.
With nested virtualization, you're effectively nesting a hypervisor within a hypervisor. The hypervisor running the main virtual machine is considered a level 0, or LO hypervisor, and the initial hypervisor running inside the virtual machine is referred to as a level 1 or L1 hypervisor. Further nested virtualization would result in a level 2 (L2) hypervisor inside the nested VM, then a level 3 (L3) hypervisor within that nested VM, and so forth.
Not all hypervisors and operating systems support nested virtualization.
Free Support Principle applies.
Nested virtualization isn't a by-product of developing a virtualizer. Just by developing a functional virtualizer there is not automatically offerthe possibility to run nested virtualization of its own or third party virtualizers. For example while the virtualizer VirtualBox existed for years, the ability to run VirtualBox inside VirtualBox using Intel CPUs was only released in VirtualBox 6.1 in 2020.  This demonstrates that extra code is required for this functionality and extra code means more attack surface.
By mixing virtualizers, for example by running the virtualizer VirtualBox inside another virtualizer VMware the attack surface increases as both virtualizer code gets involved.
Running VirtualBox, KVM or Qubes inside Qubes is difficult and is not offically supported by the Qubes developers; this is unrelated to Whonix ™. To learn more about the current state of support, search the qubes-devel [archive] and qubes-users [archive] mailing lists for terms such as VirtualBox, KVM and/or nested virtualization.
VirtualBox inside VirtualBox
On the host. (L0)
- Power off the VM (L1) if running.
- Change your host key:
Host Key. The "outside" (L0) and the "inside" (L1) Host Key must differ, otherwise you can not leave the "inside" (L1) VM anymore.
- Enable nested virtualization.
click a VM→
Enable 'Nested VT-x/AMD-V→
OK(If that does not work, see footnote.) 
- Assign less virtual CPUs. For example if your host has 4 physical CPU cores, reduce the VM to 3. 
click a VM→
Reduce to 3→
- Increase virtual RAM.
- Using I/O APIC can speed up the VM.
right-click on VM→
check "Enable I/O APIC"→
Click: OK  
- Power on the VM (L1).
Inside the VM (L1).
- Install VirtualBox.
- Now you should be able to use VirtualBox inside the VM (L1).
- If your VM (L1) has 3 "physical" (actually virtual CPU cores) do not assign more than 2 virtual CPU cores to VM (L2). Start with 1 virtual CPU for the VM (L2). If that works well for you, feel free to experiment increasing.
click a VM→
Increase to 2→
Running Whonix ™ in a Nested Virtual Machine
Only Whonix ™ 64-bit builds are available for download. See Dev/64bit for why. Some virtualizers have no or limited support running nested VMs that require 64-bit. This might be an issue when trying to run Whonix ™ in a nested virtual machine.
- https://www.webopedia.com/TERM/N/nested-virtualization.html [archive]
Hardware-assisted Nested virtualization on Intel CPUs has been available starting with VirtualBox 6.1.0
Whonix-Workstation-XFCEwith the actual name of the VM in case you renamed the VM or are using multiple Whonix-Workstation ™. The following command works on Linux. Untested on Windows but should be possible to make this command work on Windows as well. It's only about adding VBoxManage to PATH (if that is not the default) or using the full path to VBoxManage.
VBoxManage modifyvm Whonix-Workstation-XFCE --nested-hw-virt on
- https://www.virtualbox.org/ticket/19500 [archive]
vboxmanage "Whonix-Workstation" modifyvm --ioapic on
So does enabling ACPI. Enabling ACPI in all VMs significantly speeds up the "inside" VM (L1).
vboxmanage "Whonix-Workstation" modifyvm --acpi on
ACPI is the current industry standard to allow OSes to recognize hardware, configure motherboards and other devices and manage power. As most computers contain this feature and Windows and Linux support ACPI, it is also enabled by default in Oracle VM VirtualBox.
- These settings are in use for Whonix ™ VMs by default.
This is a wiki. Want to improve this page? Help is welcome and volunteer contributions are happily considered! Read, understand and agree to Conditions for Contributions to Whonix ™, then Edit! Edits are held for moderation. Policy of Whonix Website and Whonix Chat applies.
Copyright (C) 2012 - 2020 ENCRYPTED SUPPORT LP. Whonix ™ is a trademark. Whonix ™ is a licensee [archive] of the Open Invention Network [archive]. Unless otherwise noted, the content of this page is copyrighted and licensed under the same Freedom Software license as Whonix ™ itself. (Why?)