Categories
Virtualization Vmware

vCenter – Migrate is greyed out

Intro

Recently I was working on an issue where the option to migrate was greyed out inside of VMware vCenter. At the time we were not sure how this issue started, but we eventually figured it out. We were using a snapshot based backup solution which had an issue.

Allow me to explan the process. We learned that when a VM gets snapshotted, the VM gets locked by vCenter. This is to prevent the VM from moving while the snapshot is being created. I was never sure how this “lock” actually worked, but I learned that the VM id gets added to the VPX_Disabled_Methods table. Once the Snapshot get created, vCenter is supposed to remove the id from the table which will then allow you to perform migrations.

In our case, what happened was the backup created the snapshot, but never told vCenter to remove the lock. So after a bunch of calls with VMware we learnd about the VPX_Disabled_Methods table.

Warning

NOTE: Do not run this command unless you know what you are doing!!! However, running a select command should not cause any issues….

How to fix the issue

First you will need to log into the vCenter appliance console using SSH as root.

You will then need to run the following command to access the VCDB (vCenter Database)

sudo /opt/vmware/vpostgres/1.0/bin/psql -d VCDB

To see if you have any VMs that are impacted you can run the following command.

select * from VPX_DISABLED_METHODS;

If any VMs are impacted then you should see something in the list. If you do, you can take that vm-id and look them against vCenter which will probably be having the migration issue.

In order to resolve the issue you will need to delete the VM ID from the table. To do this you should run a command like this

select * from VPX_DISABLED_METHODS WHERE ENTITY_MO_ID_VAL = 'vm-xxx;

Or if you are like me, and don’t want any of your VMs to be locked, you can be like me and do the sledge hammer approach

delete * from VPX_DISABLED_METHODS;

This will clear all of the entries from the table.

Closing

I hope you found this post helpful, and if so please share with your friends.

Leave a Reply