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
To solve this issue, use one of these options:
- Manually remove entries from the vCenter Server Appliance database
- Manually remove entries from vCenter MOB
- Remove and re-add the virtual machine from the inventory
- Remove and re-add the ESXi/ESX hosting the virtual machine from the inventory
Manually remove entries from the vCenter Server and vCenter Server Appliance database
- Connect to the vCenter Server Appliance using SSH. For more information, see Toggling the vCenter Server Appliance default shell
- Stop the vCenter Server service using this command:
service-control --stop vmware-vpxd
- To connect to the vCenter Server database:
/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres
- While connected to the vCenter Server database, run:
select * from VPX_VM WHERE FILE_NAME LIKE '%Virtual_Machine_Name%';
For example:
select * from VPX_VM WHERE FILE_NAME LIKE '%VM1%';
- 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 4, as this will be required in the SQL statement in steps 6 and 7.
- To confirm the stale entry, run this command against the vCenter Server database, using the vm-id output from Step 4.
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';
- To remove the stale entry, run this command against the vCenter Server database, using the vm-id output from Step 4.
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';
- Start the vCenter Server service, then retry the vMotion.
service-control --start vmware-vpxd
Remove and re-add the virtual machine from the inventory
Caution: Removing a virtual machine from inventory removes any performance statistics and historical data associated with the virtual machine. This process should only be used if the preceding procedures are unsuccessful or you do not want to retain any historical or performance data for a defined virtual machine.
- Power off the virtual machine.
- In vSphere Client, right-click the virtual machine and click Remove from Inventory.
- Browse to the datastore where the virtual machine resides.
- Right-click the .vmx file of the virtual machine and click Add to Inventory.
Note: This gives the virtual machine a new ID.
- Power on the virtual machine and retry the vMotion operation.
Remove and re-add the ESX/ESXi from the inventory
Caution: Removing an ESX/ESXi host from inventory removes any performance statistics and historical data associated with the host. This process should only be used if the preceding procedures are unsuccessful or you do not want to retain any historical or performance data for the defined ESX/ESXi host.
- In the vSphere Client, right-click the ESXi/ESX host and click Disconnect.
- Right-click the disconnected ESXi/ESX host and click Remove from Inventory.
- After the host is removed from inventory, right-click the cluster and click Add Host.
- Provide the IP address or hostname of the ESXi/ESX host and the root username and password.