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:
- Start vSphere client
- Select ESXi's host configuration tab
- Select security profile from the list on a left
- 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.
- 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:
- Shutdown your virtual machine inside ESXi
- SSH to your ESXi:
ssh -lroot your.esxi.box.address
df - locate address of your mounted drive with VMs:
Filesystem Bytes Used Available Use% Mounted on
VMFS-5 999922073600 539996717056 459925356544 54% /vmfs/volumes/WDC1TB
- Locate location of your vmx:
find / -name *.vmx | grep HUM
- 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/
- 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.
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)
- *AAS (Amazon beanstalk, Redhat openshift)
-> DevOps inquiries
-> Other inquiries
-> Follow me on Github