Taking snapshot of vCenter fails on error "invalid state "
search cancel

Taking snapshot of vCenter fails on error "invalid state "

book

Article ID: 395781

calendar_today

Updated On:

Products

VMware vSphere ESXi VMware vCenter Server

Issue/Introduction

  • After shutting down the vCenter server running on a vSAN datastore unable to take a snapshot it shows as invalid.
  • This issue occurs even though all vSAN objects are healthy, the vSAN cluster is not showing as partitioned, and all of the VM's VMDK objects are confirmed to be accessible on the datastore.
  • You may find entries referencing an attached ISO file that is not available or accessible in hostd.log file on the ESXi host where the vCenter VM is residing.
    grep -i <VM_name> /var/log/hostd.log (replacing <VM_name> with your vCenter VM's actual name)

Cause

An inaccessible ISO is attached the vCenter virtual machine.

Resolution

To resolve this issue, you need to edit the vCenter VM's .vmx configuration file to remove or comment out the reference to the inaccessible ISO file. Follow these steps:

  1. Access the ESXi Host: SSH into the ESXi host where the vCenter VM is registered.
  2. Navigate to the VM's Directory: Go to the directory where the vCenter VM's files are stored.
    cd /vmfs/volumes/<datastore_name>/<VM_Folder_name>
  3. Backup the .vmx File: Before making any changes, create a backup copy of the vCenter VM's .vmx file.
    cp <vm-name>.vmx <vm-name>.vmx.backup
  4. Edit the .vmx File: Use a text editor like vi to open the .vmx file for editing.
    vi <vm-name>.vmx
  5. Locate and Comment Out ISO Entries: Find the lines related to the virtual CD/DVD device where the ISO is mounted.
    Example of lines to comment out:
    #sata0:0.startConnected = "FALSE"
    #sata0:0.deviceType = "cdrom-image" #sata0:0.fileName = "/vmfs/volumes/VM_Folder/ISO-file.iso"
    #sata0:0.present = "TRUE"
  6. Save and Exit: Save the changes to the .vmx file and exit the text editor.
    In vi, press Esc, then type :wq and press Enter.
  7. Reload the VM Configuration:
    Option A (Unregister and Register): Unregister the vCenter VM from the host inventory, then re-register it. KB: 335224 
    Option B : Reload vmx without removing from inventory . KB 343248