Trying to install Hyper-v feature on 2012R2 Core Standard, running on ESXi 6.5 (not the Microsoft Hyper-V server 2012 R2 barebone version).

Install-WindowsFeature –Name Hyper-V -IncludeManagementTools -Restart

Adding the feature, result in the error message below: A hypervisor is already running.

Already running

Sound advise; not to run a hypervisor virtualized. But you may need it, and for that purpose you have to use an alternative fact so the Hyper-v VM will believe that it is not virtualized: Just plain old hardware below.

1) Unregister VM from the ESXi console. First make a note of where the VM is located and datastore (Should be something like: /vmfs/volumes/<datastore>/).

2) Edit VMX file. VM should be shut down by now. The file you are looking for is something like: vmfs/volumes/<datastore>/<vm name>/<vm name>.vmx

Did not get into problems with a Windows editor, so possible no need for any vi nonsense. Now add

vhv.enable = "TRUE"
hypervisor.cpuid.v0 = "FALSE"

Source: How to Enable Nested ESXi & Other Hypervisors in vSphere 5.1 (

Re-register vm again from the console (New -> Register an existing virtual machine -> Select one or more ...) Point to the edited VMX file. Hyper-v feature installation should couplet successfully.