Due to power outage the host was rebooted and powering on virtual machine appears as skipped unknown
search cancel

Due to power outage the host was rebooted and powering on virtual machine appears as skipped unknown

book

Article ID: 393917

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article provided steps to recover and power on a virtual machine through the ESXi host after a power outage is restored and the virtual machines are shown in an skipped unknown.

Environment

VMware vSphere ESXi 7.x

Cause

  • The virtual machine is in an unknown state in the host UI.
  • The power-on button in the host UI for the virtual machines is grayed out.
  • When ssh to hosts and runs # vim-cmd vmsvc/getallvms , the affected virtual machine is listed as "skipped unknown."
  • You are not able to power on the virtual machines through the command line or using the host UI

Resolution

  • Verify the storage path that the virtual machines are residing on and take note.
  • Remove the unknown virtual machines from inventory (Unregister)
  • SSH to the ESXi host on which the virtual machine was running.
  • Identify the datastore and browse the directory for the affected virtual machine.vmx file
  • Use the solo registervm command to reload the machine.vmx file Refer to Add or Register a Virtual Machine (VM) in vCenter Server
  • Obtain the VM's VM ID by running vim-cmd vmsvc/getallvms  and looking at the leftmost column.
    Run the command:
    # vim-cmd vmsvc/getallvms | grep <vm_name>
  • Power on the virtual machine

NB:  If vCenter is also part of affected VM's we can use the host UI/SSH

Additional Information

How to add a virtual machine to the vCenter Server inventory through the ESXi host Add or Register a Virtual Machine (VM) in vCenter Server