VM showing as 'invalid'
search cancel

VM showing as 'invalid'

book

Article ID: 339881

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

The purpose is to register the VM on host.


Symptoms:

  • VM shows as 'invalid' when you register it
  • The lck [lock] file has already been removed
  • The host having lock has already been rebooted
  • The lock is not held by any backup proxy VM
  • ESXi still shows lock on vm, there is no process of VM running on the host


hostd logs  

2021-02-17T07:29:03.377Z info hostd[1050317] [Originator@6876 sub=Vimsvc.ha-eventmgr opID=esxui-ccb3-cb42 user=root] Event 18 : Virtual machine VM on localhost.localdomain in cluster localhost. in ha-datacenter uses hardware version 18, which is no longer supported. Upgrade is recommended.
2021-02-17T07:29:03.377Z error hostd[1050317] [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/5f888244-########-####-b8cb29967779/VM/VM.vmx opID=esxui-ccb3-cb42 user=root] SetVmxVersion: invalid vmx version 'vmx-18'
2021-02-17T07:29:03.377Z warning hostd[1050317] [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/5f888244-########-####-b8cb29967779/VM/VM.vmx opID=esxui-ccb3-cb42 user=root] SetEnvironmentBrowser: VM version '18' not supported on this host
2021-02-17T07:29:03.377Z info hostd[1050317] [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/5f888244-########-####-b8cb29967779/VM/VM.vmx opID=esxui-ccb3-cb42 user=root] Failed to load virtual machine
2021-02-17T07:29:03.377Z warning hostd[1050317] [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/5f888244-########-####-b8cb29967779/VM/VM.vmx opID=esxui-ccb3-cb42 user=root] Failed to load VM from vigor during register Fault cause: vmodl.fault.NotSupported

-->

Environment

VMware ESXi 6.0.x
VMware ESXi 6.7.x
VMware vSphere ESXi 7.0.x
VMware ESXi 6.5.x

Cause

This happens due to VM hardware version mismatch.

Resolution

To address this issue please do perform mention stops do not skip any steps.
  1. Make sure the VM is power-off and do take a backup of VMX file
  2. Find the host version with the command "vmware -vl" 
  3.  Check hardware version from vmx file
    • #cat Virtual-Machine.vmx
      encoding = "UTF-8"
      config.version = "8"
      virtualHW.version = "18"
    •  
  4. Validate the version that should be on the host using KB: https://kb.vmware.com/s/article/1003746 
  5. Once validated, change the virtualHW.version  to the supported hardware version.
Example:
virtualHW.version = "14"
       6. Re-register the VM on the host, either from the command line or else from GUI 
 command to register the VM 
# vim-cmd solo/registervm /vmfs/volumes/datastore_name/VM_directory/VM_name.vmx