Whilst performing some Storage vMotion activities recently, I discovered an issue with 3 virtual machines in my environment where they were unable to perform a vMotion of any type due to the Migrate option being greyed out in vCenter. I believe that this actually occurred because the 3 virtual machines in question had been in the middle of a Storage vMotion activity when my vCenter server was rebooted.
As you may already know, when a vMotion activity is performed, a table in the vCenter DB is updated to identify that the VM cannot perform other activities of the same type. This DB entry is what disables the Migrate menu item. The DB entry is subsequently removed when the vMotion activity is completed. As the vCenter server was rebooted during one of these processes, the three virtual machines in question did not have their entries removed from the database table.
Here is a method that I used to correct this issue, it is based on a KB article by VMware (https://kb.vmware.com/s/article/2008957) but their method of finding the VM id can be hard to figure out and therefore I used a simple piece of PowerCLI to find the same information. Please note that if you perform this process, you do it at your own peril, I took a snapshot of the whole virtual machine before beginning this process and if you access the KB article from VMware, they advise taking a backup as well… here’s what I did:
service vmware-vpxd stop
/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres
SELECT * FROM VPX_DISABLED_METHODS WHERE ENTITY_MO_ID_VAL = 'moref id collected earlier';
DELETE FROM VPX_DISABLED_METHODS WHERE ENTITY_MO_ID_VAL = 'moref id collected earlier';
In previous years, I have had periods throughout the year where I have been unable to post an entry to my blog. During 2018, my aim is to post a blog entry each week of the year. I’m hoping that the blog entries will all be useful bits of information or items that I’ve been working on recently but if the standard of the entries drops, I apologise now, as this could have been a busy week and I wasn’t able to put in as much time as I would have liked into the post