VM suddenly appeared invalid "/vmfs/volumes/xxxxxxxx-xxxxxxxx-xxxx-xxxxxxxxxxxx/vm_name.vmx" and we want to remove it
search cancel

VM suddenly appeared invalid "/vmfs/volumes/xxxxxxxx-xxxxxxxx-xxxx-xxxxxxxxxxxx/vm_name.vmx" and we want to remove it

book

Article ID: 413654

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

The original VM “vm_name” is running normally on the host. Both VMs are currently located on the same host.

1. Is it safe to remove the invalid VM "/vmfs/volumes/xxxxxxxx-xxxxxxxx-xxxx-xxxxxxxxxxxx/vm_name.vmx"?
2. Is it required to migrate the original VM to another host before removing it?

Environment

VMware vCenter Server 7.x

VMware vCenter Server 8.x

Cause

In vCenter Server, a VM can have one of several connectivity states:
  • Connected: vCenter Server can access the VM.
  • Disconnected: vCenter Server is disconnected from the VM because its host is disconnected.
  • Inaccessible: One or more VM configuration files are inaccessible due to possible network partition issues, Physical network issues, storage issues, or file corruption.
  • Invalid: The ESXi host is offline or inaccessible; the VM configuration file is locked or corrupt, or contains a bad option; other possible causes.
  • Orphaned: The VM exists in the vCenter Server database but is no longer present in the ESXi host inventory.

Resolution

As both the VMs are on same host following steps would be recommended to remove the invalid .vmx: 

  1. Perform the compute only vMotion for the "vm_name” to any other host in the cluster.

  2. To remove an orphaned VM from inventory, right-click the VM and choose "Remove from inventory."

  3. Verify the original powered on VM migrated to different host is working as expected. 

Additional Information

In the case of invalid virtual machines there are many potential causes and additional troubleshooting is required. The most common causes and resolutions are discussed here.