This document is for test and educational purposes only.
This document is still under review; sections of this document could change and further enhancements and/or options can be introduced on the same.
Introduction
Nested virtualization is useful in a variety of scenarios, such as debugging hypervisors in a constrained environment and testing larger virtual deployments on a limited amount of physical resources. However, note that nested virtualization is not supported or recommended in production user environments, and is primarily intended for development and testing.
How to Achieve this :
In order to do nested virtualization on Oracle Linux Virtualization Manager, we need to configure the following :
Enable Nested Virtualization on the KVM host
It is always recommended to put the Host into maintenance mode before making any changes.
- Navigate to the host on which you want to enable the nested virtualization.
- Click on Edit --> Kernel Tab.
- Check the "nested virtualization" checkbox.

- Reboot the host for the changes in the kernel boot parameters to take the effect.
**Enable MAC Spoofing
**
By default, MAC spoofing is disabled in OLVM. This is required for allowing the nested KVM host to pass traffic from its guests up through the machine in which it's hosted.
- In OLVM GUI, Go to Network and Click vNIC Profiles.
- Select vNIC profile and press Edit.
- By default, Network filter will have vdsm-no-mac-spoofing. Select No Network Filter in drop-down.

- Press OK
Enable Pass-Through Host CPU
In order to enable nested virtualization in OLVM, You will need to pin the VM that you want to use it on to a particular host and disallow migration of that VM using live migration features.
- Edit the VM where nested virtualization has to be enabled. Click on the Host Tab as shown below:

- Once the host Tab is opened. To pin the VM to a particular host click on start running on a particular host. Set the migration mode to Allow manual migration only. Once this is completed the Pass-Through Host CPU button will be enabled for use as shown below:

- Start the guest VM.
Now, We can use this guest VM and run nested hypervisor solutions like KVM and/or Oracle VM.