Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / ECMAScript / ESXi

Enable Virtualization inside ESXi Virtual Machine

5.00/5 (1 vote)
22 Sep 2015CPOL1 min read 49.9K  
Steps to enable nested virtualization VT-x, AMD-V in VMWare ESXi 5.1

Introduction

One day, I got a task to implement vagrant based scenario for my client. For quite a long time, I am using free VMWare ESX-i hypervisor for my experiments, as it allows up to 4 virtual boxes to be run in parallel for my labs experience.

The first issue I spotted, once I installed Oracle Virtual Box & Vagrant on my ESXi box, is the inability to start vagrant controlled image, due to luck of virtualization support. There were no options to turn it on via ESXi GUI client, so I have started to look for a solution.

Enabling the ssh Access on your ESXi Host

Please find below the success steps:

  1. Start vSphere client
  2. Select ESXi's host configuration tab
  3. Select security profile from the list on a left
  4. Click properties on the upper right corner and you will get a popup with all the services on this ESXi box. Select the SSH service and press the Options button. 
  5. Start the SSH service - you are now prepared for the most important step

Enabling VT-x / AMD-V Virtualization Inside ESXi Virtual Machine

The most tricky part. Make sure to check your steps:

  1. Shutdown your virtual machine inside ESXi
  2. SSH to your ESXi:
    C++
    ssh -lroot your.esxi.box.address
  3. run df - locate address of your mounted drive with VMs:
     df
    Filesystem        Bytes         Used    Available Use% Mounted on
    VMFS-5     999922073600 539996717056 459925356544  54% /vmfs/volumes/WDC1TB
  4. Locate location of your vmx:
    find / -name *.vmx | grep HUM
    /vmfs/volumes/54183927-04f91918-a72a-6805ca147c55/W-NodeBox-HUM/W-NodeBox-HUM.vmx
  5. Put setting vhv.enable=TRUE at the bottom of your box's vmx file:
     echo 'vhv.enable = "TRUE"' >> /vmfs/volumes/54183927-04f91918-a72a-6805ca147c55/W-NodeBox-HUM/
    W-NodeBox-HUM.vmx
  6. You are done.  Start your machine normally and enjoy from possibility to run vagrant&virtualbox controlled boxes inside your ESXi host. (Hopefully, you need it like me just to test the vagrant setup.)

Points of Interest

This tip allows to enable virtualization inside nested virtual machines under ESXi hypervisor.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)