Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

FAQ
It is currently Sat Aug 19, 2017 2:43 am


Software and Hardware virtualization, Linux Kernel Virtualization Module, FreeBSD jails, Vmware, Virtualbox, Xen

Author Message
admin
Post  Post subject: KVM Nested in Vmware ESXi 5.5 - enable guest hypervisor vmx/svm flags without vsphere web client  |  Posted: Sat Feb 21, 2015 8:21 pm
Site Admin

Joined: Mon Aug 03, 2009 8:43 am
Posts: 95

Offline
 

KVM Nested in Vmware ESXi 5.5 - enable guest hypervisor vmx/svm flags without vsphere web client

Both Vmware ESXi and the open source alternative KVM (Kernel Virtualization Module) that turns a Linux server into a native hypervisor can run as nested hypervisors, meaning they are not installed on the bare metal machine, but they are themselves virtual machines under the other.

KVM nested in ESXi 5.5 - Requirements


In order for KVM module to load (or the packages to even install), the CPU has to have the Intel/AMD virtualization technology flags (vmx/svm) in /proc/cpuinfo. These technologies assist the hypervisors virtualization functions, specially I/O operations.

Enable vmx/svm flags for the Guest/Nested hypervisor in Vmware ESXi5.5 from CLI


The official guide - https://communities.vmware.com/docs/DOC-8970 - for enabling hardware assisted virtualization (VMX/SVM CPU flags) for the guest hypervisor is to use the web client. For those of us using this setup just for testing and using the free vsphere client, this method is not compatible.

So how can vmware ESXi 5.5 be instructed to provide the CPU virtualization vmx flag to the guest hypervisor without web client ?
There are two workarounds: one from the regular vsphere client and one from the ESXi 5.5 shell.
Steps:
1. Shutdown the nested/guest hypervisor (Ubuntu KVM in my case)
2. Locate the guest hypervisor virtual machine configuration file (<VM-name.vmx>), edit and add the following line at the end:
Code:
vhv.enable = "TRUE"

Save and close the file.
3. Identify the nested hypervisor vm ID and reload it's configuration with the [b]vim-cmd esxi command:[/b]
Code:
~ # vim-cmd vmsvc/getallvms | grep -i ubun
44     VM6-Ubuntu-KVM        [datastore1] VM6-Ubuntu-KVM/VM6-Ubuntu-KVM.vmx             ubuntu64Guest      vmx-08
~ # vim-cmd vmsvc/reload 44

4. Start the nested VM

Verify that the nested hypervisor correctly detects the vmx flag


Once the virtual machine started, login and check the /proc/cpuinfo file:
Code:
$sudo grep -c vmx /proc/cpuinfo
4


Enjoy!

_________________
VPSie - SSD VPS servers in AMS-IX, LINX, DE-CIX
https://vpsie.com





Top
Display posts from previous:  Sort by  
E-mail friendPrint view

Topics related to - "KVM Nested in Vmware ESXi 5.5 - enable guest hypervisor vmx/svm flags without vsphere web client"
 Topics   Author   Replies   Views   Last post 
There are no new unread posts for this topic. SSH Login to Vmware ESXi with ssh keys

admin

0

112

Wed May 24, 2017 7:28 am

admin View the latest post

There are no new unread posts for this topic. How to add BIOS boot delay for particular VM in VMWare ESXi 5.x

mandrei99

0

646

Wed Feb 19, 2014 4:05 pm

mandrei99 View the latest post

There are no new unread posts for this topic. Vmware ESXi - esxtop output is not readable

mandrei99

0

975

Mon Jan 26, 2015 6:53 am

mandrei99 View the latest post

There are no new unread posts for this topic. How to retrieve Vmware ESXi license from ssh shell command line

admin

0

189

Wed May 03, 2017 8:51 am

admin View the latest post

There are no new unread posts for this topic. KVM create FreeBSD10 guest VM with no graphics

mandrei99

0

846

Fri Jan 31, 2014 5:13 am

mandrei99 View the latest post

There are no new unread posts for this topic. CentOS and KVM: Setup VNC server on the hypervisor

mandrei99

0

755

Tue Feb 04, 2014 9:05 am

mandrei99 View the latest post

There are no new unread posts for this topic. FreeBSD virsh console hangs in "Escape character is ^]" \w KVM hypervisor any text console provider

mandrei99

0

1404

Fri Jan 31, 2014 5:35 am

mandrei99 View the latest post

There are no new unread posts for this topic. ESXi: How to see network statistics for vSwitch port using esxcli

mandrei99

0

5216

Mon Jan 26, 2015 7:07 am

mandrei99 View the latest post

 

Who is online
Users browsing this forum: No registered users and 0 guests
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Jump to:  
News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]



phpBB SEO