Symptoms:
Call "VirtualMachine.Relocate" for object "Virtual Machine-NAME" on vCenter Server "vCenter-Name" failed
VMware vCenter Server 6.5.x
VMware vCenter Server 6.7.x
VMware vCenter Server 7.0.x
VMware vCenter Server 8.0.x
Caution: This procedure modifies the database. Ensure there is a current backup/snapshot of the vCenter prior to attempting these steps. VMware vCenter in Enhanced Linked Mode pre-changes snapshot (online or offline) best practice
1. Connect to the vCenter Server Appliance using SSH. For more information, see Toggling the vCenter Server Appliance default shell
2. Stop the vCenter Server service using this command:
service-control --stop vmware-vpxd
3. To connect to the vCenter Server database:
/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres
4. Verify entries from the vCenter Server database vpx_disabled_methods table.
select * from vpx_disabled_methods;
5. Find id for affected virtual machines using the below command,
select id from VPX_VM WHERE FILE_NAME LIKE '%Virtual_Machine_Name%';
For example:
select id from VPX_VM WHERE FILE_NAME LIKE '%VM1%';
NOTE: Virtual_Machine_Name is the name of the virtual machine. Leave the percentage (%) signs.
Make a note of the numerical ID value returned by the SQL statement in step 5, as this will be required in the SQL statement in steps 6 and 7.
6. To confirm the stale entry, run this command against the vCenter Server database, using the vm-id output from Step 5.
select * from VPX_DISABLED_METHODS WHERE ENTITY_MO_ID_VAL = 'vm-ID';
For example:
select * from VPX_DISABLED_METHODS WHERE ENTITY_MO_ID_VAL = 'vm-1234';
7. To remove the stale entry, run this command against the vCenter Server database, using the vm-id output from Step 5.
delete from VPX_DISABLED_METHODS WHERE ENTITY_MO_ID_VAL = 'vm-ID';
For example:
delete from VPX_DISABLED_METHODS WHERE ENTITY_MO_ID_VAL = 'vm-1234';
8. Start the vCenter Server service, then retry the vMotion.
service-control --start vmware-vpxd
How to stop, start, or restart vCenter Server services
Toggling the vCenter Server Appliance default shell
Impact/Risks:
When removing a virtual machine from the vCenter Server Inventory, the previous performance statistics for the virtual machine are lost.