Unable to start VM after ESXi host crashed
search cancel

Unable to start VM after ESXi host crashed

book

Article ID: 391487

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

  • The VM went into an invalid state after the ESXi host crashed.
  • ".vmdk" files are healthy
    • Check the UUID of the vmdk
      • Go inside the directory of the VM where .vmdk exists.
      • Execute command : grep RW *.vmdk --> to get the UUID

[root@ESXiHost:/vmfs/volumes/vsanDatastore/VMDirectory] grep RW *. vmdk
VMName_1.vmdk:RW 1073741824 VMFS "vsan://######/acdec667-####-####-####-ece7a706abec"
VMName.vmdk:RW 167772160 VMFS "vsan://######/acdec667-####-####-####-ece7a706a7f8"

    • Check the object attributes to valdiate if the VMDK are healthy
      • Command: /usr/lib/vmware/osfs/bin/objtool getAttr -u <VMDK UUID>

  • When trying to list the VM directory, we are able to list, however unable to cat the vmx folder getting input/output Error

[root@ESXiHost] cat /vmfs/volumes/vsanDatastore/VMName.vmx
cat: can't open 'VMName.vmx' : Input/output error

Environment

  • VMware vSphere ESXi 7.x
  • VMware vSphere ESXi 8.x

Cause

The .vmx configuration file is corrupted, while the virtual disk files (.vmdk) still exists without any corruption or broken/missing snapshot chain.

  • Input/output Error on the /var/log/hostd.log for the impacted VM.

[yyyy-mm-ddThh-mm-ss]Z info hostd[2102283] [Originator@6876 sub=Libs opID=vim-cmd-dc-c242 user=root] VigorOffline_Init: Failed to initialize VIGOR offline: Cannot open file "/vmfs/volumes/vsanDatastore/VMName.vmx": Input/output error
[yyyy-mm-ddThh-mm-ss]Z into hostd[2102283] [Originator@6876 sub=Libs opID=vim-cmd-dc-c242 user=root]
[yyyy-mm-ddThh-mm-ss]Z verbose hostd[2102283] [Originator@6876 sub=Vmsvc. vm:/vmfs/volumes/vsanDatastore/VMName.vmx opID=vim-cmd-dc-c242 user=rootoadFromConfig translated error to vim. fault. FileNotFound
[yyyy-mm-ddThh-mm-ss]Z verbose hostd[2102283] [Originator@6876 sub=Vmsvc.vm:/vmfs/volumes/vsanDatastore/VMName.vmx opID=vim-cmd-dc-c242 user=rootoadFromConfig message: Cannot open file "/vmfs/volumes/vsanDatastore/VMname.vmx": Input/output error

A .vmx file is a plain text configuration file that stores all the settings and hardware configurations of a virtual machine (VM). 

Resolution

  • Restore the VM from backup

or