VM showing as "Invalid" in vCenter and unable to power on
search cancel

VM showing as "Invalid" in vCenter and unable to power on

book

Article ID: 391626

calendar_today

Updated On:

Products

VMware vSAN VMware vCloud Director 5.x VMware vCenter Server

Issue/Introduction

  • VM shows as invalid in vCenter
  • VM is in powered OFF state and unable to power ON from vCenter as well as vCloud Director.
  • There is no lock on the VM files.
  • Datastore having the VM is having no errors or issue.
  • We see VM-Name.vmx~ file, in the VM folder /vmfs/volumes/datastore-UUID/VM-Name.

Environment

vCenter Server (All Versions)

vCloud Director

Cause

A stale temporary .vmx file contains outdated state information, showing a VM as 'Powered On' despite it being 'Powered Off.' This inconsistency is usually caused by an improper shutdown that leaves residual temporary files behind.

Resolution

  • Unregister the VM from vCenter and re-register.
    Virtual machines appear as invalid or orphaned or inaccessible in vCenter Server
  • If above still shows the VM in invalid state then follow the below steps:
    • Navigate to the VM folder by taking an SSH to the ESXI host on which the VM resides:
      cd  /vmfs/volumes/datastore-UUID/VM-Name
    • Create a temporary directory - temp:
      mkdir temp
    • Move the VM-Name.vmx~ file to temporary directory:
      mv VM-Name.vmx~ temp
    • Remove the VM from Host inventory and re-register the VM to the Host inventory.
    • Power ON the VM.