In VMware ESXi 8.x, attempting to unregister a virtual machine (VM) that appears powered off from the vSphere Client fails.
The operation is not allowed in the current state.This issue occurs when a stale or orphaned process associated with the virtual machine remains active on the ESXi host.
Even though the VM appears as powered off, the stale process keeps file locks on the VMX or VMDK files, preventing the unregister operation.
Possible causes of the stale process include:
Manually identify and terminate the stale VM process on the ESXi host.
Important: Ensure that the VM is actually powered off and that no valid process is running before terminating any process.
esxcli vm process listTEST-01World ID: 123456Process ID: 3425012Display Name: TEST-01esxcli vm process kill --type=force --world-id=<World ID>kill -9 <Process ID> esxcli vm process list