Click here to Skip to main content
15,894,291 members
Articles / Programming Languages / ECMAScript / ESXi
Tip/Trick

Enable Virtualization inside ESXi Virtual Machine

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
22 Sep 2015CPOL1 min read 47.2K   1
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)


Written By
Web Developer
Ukraine Ukraine
Web Developer, interested in bleeding age web technologies and projects.

Experienced and interested in:
- High load web projects, bespoke software development
- DevOps: Chef, Ansible, Vagrant
- NoSQL (mongodb)
- Client stack (javascript core, jquery, AngularJS, HTML5 apis)
- *AAS (Amazon beanstalk, Redhat openshift)
- MEAN & Pure JS stack (Javascript, AngularJS, Node.JS, MongoDB)


-> DevOps inquiries
-> Other inquiries
-> Follow me on Github

Comments and Discussions

 
GeneralMy vote of 5 Pin
Dan_Edeen26-Apr-20 15:51
Dan_Edeen26-Apr-20 15:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.