vMotion to specific ESXi host fails with "Configuration mismatch" error due to vhv.enable setting
search cancel

vMotion to specific ESXi host fails with "Configuration mismatch" error due to vhv.enable setting

book

Article ID: 418908

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

  • Virtual machine (VM) migration using vMotion fails when attempting to move the VM to a specific ESXi host within the cluster.
  • The failure is caused by a configuration mismatch between the source and destination ESXi hosts.

  • The vmware.log for the VM or the event logs may contain an error message indicating a problem related to the Hardware Virtualization (VHV) feature:

    YYYY-MM-DDT09:37:29.907Z In(05) vmx - [msg.cpuid.vhv.enablemismatch] Configuration mismatch: The virtual machine cannot be restored because the snapshot was taken with VHV enabled. To restore, set vhv.enable to true.
    

 

Environment

VMware vSphere ESXi

VMware vSphere ESX

Cause

The vMotion failure is due to an inconsistency in the Hardware Virtualization (VHV) setting (vhv.enable) between the ESXi hosts involved in the migration.

  • The issue arises when one ESXi host (typically the destination) has the setting vhv.enable = "TRUE" configured in its global configuration file (/etc/vmware/config).

  • The other host (typically the source) either does not have this line or has it set to FALSE.

This difference in host-level configuration for VHV causes the vMotion fail, preventing the live migration.

Note: The vhv.enable setting exposes hardware virtualization support to guest operating systems. This setting is only necessary for workloads like Nested ESXi (running an ESXi VM inside a physical ESXi host) and is generally not required on a physical production ESXi host.

Support for running ESXi as a nested virtualization solution

Resolution

The recommended resolution is to remove the unnecessary vhv.enable = "TRUE" configuration from the affected ESXi host's configuration file, as it is not needed for a physical host.

Step 1: Modify the ESXi Host Configuration

Perform the following steps on the ESXi host that contains the line vhv.enable = "TRUE" in its /etc/vmware/config file (usually the host where the vMotion failed).

  1. Access the ESXi host using SSH as the root user.

  2. Back up the configuration file: Before making changes, copy the /etc/vmware/config file to a persistent datastore for backup purposes. Do not place the backup copy in the /etc/vmware/ directory.

    cp /etc/vmware/config /vmfs/volumes/[Datastore_Name]/vmware.config.bak
    
  3. Edit the configuration file using a text editor (e.g., vi):

    vi /etc/vmware/config
    
  4. Locate the line:

    vhv.enable = "TRUE"
    
  5. Delete this line.

  6. Save and exit the file (In vi, press Esc, type :wq, and press Enter).

 

Step 2: Restart the Affected Virtual Machine

For the configuration change to take effect on the virtual machine's settings:

  1. Power off the affected virtual machine.

  2. Power on the virtual machine.

 

Step 3: Verify vMotion

After the VM has been powered on, attempt to perform vMotion again to the previously failing destination host to confirm the issue is resolved.