VMware ESXi running under QEMU/KVM

August 2017


Recently we had to prepare the lab for executing test scenarios for VMware’s ESXi and iSCSI. You can use laptop for that. Here is a how-to on running ESXi 6.0 under QEMU/KVM.


  • Modern laptop - with some sort of virtualization acceleration technology included (Intel i7-4600U in my case; 8GB of memory may not be enough to run complex setup)
  • VMware vSphere ESXi iso (you can download it from my.vmware.com)
  • QEMU-KVM installed

Prepare host (your laptop)

Enable nested virtualization. This allows You to run a virtual machine (VM) inside another VM while still using hardware acceleration from the host.


Check if already enabled:

# cat /sys/module/kvm_intel/parameters/nested

If no, use boot parameter kvm-intel.nested=1 or configure module parameter (options kvm-intel nested=y in /etc/modprobe.d/kvm-intel.conf) and reload kvm-intel module.

Same procedure applies to AMD CPUs. Use kvm-amd instead.

Create VM for ESXi

Create a new VM for ESXi:

  • at least 2 vCPUs
  • at least 4GB of memory
  • set vCPU model to Westmere
  • set Chipset model to Q35
  • use e1000 network device model
  • use SATA disks
  • use SATA CDROMs

Not all QEMU/KVM GUIs allows to enable nested virtualization option, so add it manually - virsh edit your-vm-name and put <kvm><hidden state='on'/></kvm> and <feature policy='require' name='vmx' />.

      <hidden state='on'/>
  <cpu mode='custom' match='exact'>
    <feature policy='require' name='vmx'/>

Boot ESXi VM from ESXi iso

screenshot 01
screenshot 02
screenshot 03
screenshot 04
screenshot 05

Creating VM inside ESXi

ESXi is up and running at your command. When creating VM inside ESXi remember to put addition parameter vmx.allowNested = "TRUE"

screenshot 06

PS. We recommend FreeNAS when testing different storage solutions for ESXi - iSCSI, NFS and such. It’s easy to setup and maintain and offers wide variety of options.