Building Nested VMware Environment

In this post i will share with you how to build up nested environment on top of VMware vSphere 6.0. In other words virtualization inside of virtualization. This can be really useful if you want to build up a lab and don’t have enough physical hosts. but got some resources in your virtual environment.

So lets start!

There is some pre-requirements to allow you to run the ESXi hypervisor on top of ESXi hypervisor.

  1. We have to configure networking for each host in your cluster if you use standard vSwitches. Or just make changes on one distributed vSwitch.
    NestedPrep-1
    As you have already created port group for your nested environment we have to go configure it
    NestedPrep-2
    We have to set Promiscuous mode to accept (otherwise you wont be able to see any traffic on your VMs) Better do all changes specially for individual port group and not switch as you don’t want to have promiscuous mode to accept on your other VMs in your environment.
    NestedPrep-3
  2. Then we have to make virtualization possible on your VM and we have to make some record in config file on your hosts (should be done on each host in cluster. otherwise if you have DRS enabled you will have problems when VM is moved to another host)
    Enable SSH. Go to host->manage->Security profile- edit (Services)
    NestedPrep-4
    Start SSH service and if you need ESXi Shell also start it
    NestedPrep-5
    GO to Putty (or any other SSH client) and login to your ESXi host (use your root credentials):
    NestedPrep-6
    Type in the following command to add record in config file to enable virtualization

    echo
    ‘vhv.
    enable
    =
    "TRUE"
    >>
    /etc/vmware/config

    NestedPrep-9

  3. If you are installing on top of VMware vSan you have to run ESXi Shell
    You can start service as mention in previous point via webclient. or you can do it from ssh shell:
    Type:

    dcui

    NestedPrep-7
    Press F2 and enter your credentials. go to troubleshooting options and choose turn on ESXi shell

    NestedPrep-8
    Ctrl+C to see the command line again and type in the following command:

    NestedPrep-10

    esxcli system settings advanced set -o /VSAN/FakeSCSIReservations -i
    1
  4. Now we are done with the host (don’t forget to disable ESXi Shell and SSH access as it is not good for your virtual environment security)
  5. Now we have to go to our VM options where we plan to install ESXi Hypervisor and enable virtualization on it:
    Expose hardware assisted virtualization to the guest OS:
    NestedPrep-11
    Edit Configuration:
    NestedPrep-12
    Add vhv.enable=”TRUE”:
    NestedPrep-13

Now you are fully set and you can start your virtualization lab! Thank you for reading and see you in the next post.

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.