home lab

Home Lab Nested Virtualization E-book Download

Unlock the power of nested virtualization in your home lab with a free ebook download that details nested VMs for VMware and Proxmox

Nested virtualization is one of the most underutilized tools in home labs in my honest opinion. It is a tool and technology that allows you to have what you need to “rinse and repeat” steps in a home lab. Or, if you are just wanting to tinker around with technologies you have never played with before, it is a great way to do that without having to rebuild fresh VMs each time. Take note of my how to guide for nested virtualization, why it is important, how you can use it, and a free E-book I have published for you to download.

What is nested virtualization?

It is the process of running a virtual machine (VM) inside another VM in your existing virtual environments. Nesting takes advantages of the hardware of modern CPUs to allow hardware virtualization to be exposed to virtual hypervisors. It allows you to use your lab and even production hardware more efficiently and take advantage of the hardware resources available. It is a great way to spin up labs and other test scenarios.

You can even run nested virtual machines inside the nested hypervisor environment (Proxmox, VMware, Hyper-V virtual machines, etc). The nested VMs do not know the difference between he nested hypervisor and one that is running on a physical hypervisor host.

Nested proxmox inside vmware esxi
Nested proxmox inside vmware esxi

General requirements

Note the following:

  • You need a relatively modern CPU that supports nested virtualization on Intel or AMD processors (Intel VT-x or AMD-V)
  • You will generally need to enable promiscuous mode and enable mac address spoofing on your virtual switch where your nested hypervisor virtual machines are running
  • You will need nested virtualization enabled on the virtual machine that is running the hypervisor

You enable the feature on the host system, configuring virtual switches, and configure from the console or use something like PowerShell commands to fine-tune the VM’s settings to support nested virtualization if you want to automate the process.

In VMware ESXi, you can enable it by selecting to expose hardware assisted virtualization to the guest OS.

Enabling nested virtualization on a vmware virtual machine
Enabling nested virtualization on a vmware virtual machine

Enabling promiscuous mode, mac address spoofing, and forged transmits.

Configuring a virtual switch for nested virtualization
Configuring a virtual switch for nested virtualization

Why Enable Nested Virtualization?

It opens the door to many possibilities that are challenging or impossible with physical hardware, instead running as a virtual server which is a nested VM. You can create isolated and secure environments within a single physical server or even virtual “clusters” simulating a physical virtualization cluster.

You can use things like snapshots with nested hypervisors which is something you can’t do otherwise. For instance, if you want to create an ESXi cluster and learn how to setup vSAN, you can configure the ESXi hosts without vSAN, create a snapshot, and then install vSAN. To repeat the steps on the hosts, just roll back to your snapshot and repeat. You can do this as many times as needed.

There are many great reasons to implement nested virtualization as it makes many types of lab or development environments much easier.

Software Testing and Development

For software developers, it means they can quickly spin up and tear down testing environments. They can simulate different operating systems and and hypervisor configurations.

Training

In training settings, it is a great way for students to learn about system administration, network configuration, and cybersecurity practices by experimenting in isolated VMs.

Legacy Applications

Nested virtualization is a great way to support legacy environments. I know I had a situation where I had a legacy version of the P2V utility that only supported an ESXi version up to 4.1. I had a much newer hypervisor. However, I was able to spin up a nested ESXi 4.1 host and then target it for the P2V task.

Considerations and Best Practices

When enabling nested virtualization, it’s crucial to consider the impact on performance and security. Proper configuration of virtual switches and network settings is essential to maintain isolation between nested VMs and the outside world.

Dual purpose lab and workstation

Using client Hyper-V, Microsoft’s solution for client virtualization, you can run virtual machines using nested virtualization on your laptop or desktop. You can create Hyper-V virtual machine to support nested VMs by enabling hardware virtualization extensions and adjusting your network settings to communication between nested environments.

Using client hyper v for nested virtualization
Using client hyper v for nested virtualization

How to Enable Nested Virtualization

Enabling nested virtualization involves adjusting hypervisor settings to allow a VM to act as a host for other VMs. This process varies depending on the hypervisor (e.g., Proxmox, Hyper-V, VMware). It requires modifying the VM’s configuration to expose hardware virtualization capabilities to the guest operating system and loading the virtual machine accordingly.

You can download the free ebook below. All I ask in return is for you to subscribe for updates in the subscription form below.

Download my newly available Nested Virtualization E-book here: Nested Virtualization Home Lab E-book.

Subscribe to VirtualizationHowto via Email 🔔

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com and has over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, Brandon has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.