vmware virtual machine invalid or orphaned
reason
In vCenter Server, an "orphaned" virtual machine is a virtual machine that exists in the vCenter Server database but is no longer displayed in the ESX host inventory.
An "Invalid" virtual machine is a virtual machine that is inaccessible for reasons such as the ESXi host is offline or inaccessible, the virtual machine configuration file is locked or corrupted or contains an error option, or other possible reasons.
Solution
If the virtual machine is in "orphaned" state, if possible (if not already deleted) you need to re-register the virtual machine or remove it from the inventory.
To re-register a virtual machine, navigate to the location of the virtual machine in the Datastore browser and re-add the virtual machine to the inventory.
Operation steps
To register a virtual machine in vCenter Server:
- Log in to the vSphere Web Client (Flex/Flash or HTML5).
- Click the desired host.
- ClickData storageTab.
- Click the corresponding data store
- ClickdocumentTab
- Find the correct directory for the virtual machine and double-click to open the folder
- Locate the virtual file and click the file to highlight.
- Click the "Register Virtual Machine" button
- If using the Flex/Flash client, right-click the VMX file and select Register Virtual Machine
- Continue to follow the wizard to add the virtual machine.
To register a virtual machine from the command line in an ESXi host:
Log in as root to an ESXi host with an SSH client.
For more information on enabling SSH on ESXi hosts, seeUsing ESXi Shell in ESXi and
Run the following command:
# vim-cmd solo/registervm /vmfs/volumes/datastore_name/VM_directory/VM_name.vmx
To cancel the virtual machine registration on vCenter Server:
- Log in to the vSphere Web Client (Flex/Flash or HTML5).
- Power off the virtual machine.
- Right-click on the virtual machine and select Remove from inventory. :
Refer to vmware official website:
VMware Knowledge Base
Summarize
The above is personal experience. I hope you can give you a reference and I hope you can support me more.