I recently upgraded the storage section in a customer’s vSphere environment, by adding a new and more powerful SAN. Since customer had VMware licenses with Storage vMotion, we started moving the several virtual machines he had towards the new storage, without obviously shutting them down.
In a couple of virtual machines, migration task was not possible, and vCenter gave us this error:
I did a quick search for the error string ” The method in disabled by ‘vm’ ” and I found these two articles:
– KB 2008957 on VMware knowledge
– this post in Veeam forums, linking too the same VMware article
The error in fact seemed like involving the backup software too, even if at the end it was related to VMware only. vSphere requires that every backup software using VADP libraries (like Veeam in this customer) sends a request to vCenter to disable Storage vMotion for the virtual machine beeing saved. This is a smart feature per se, so a Storage vMotion task cannot break a backup operation.
The error’s cause however is sometimes, with no apparent and consistent reason, vCenter does not register correctly the “end of backup” signal coming from the backup software, and so the virtual machine remains in a locked state with Storage vMotion disabled.
To solve this error, there are several methods listed in the VMware article. The first one (wait for another backup run to see if the lock is removed) was not right in our situation since we have already disabled backup jobs just to complete the storage migration during the weekend, eve if this method was the safest one. The second method (unregister and register again the locked VM) is something I don’t like at all: first you have to shutdown the VM, thus wasting the enterprise licenses with storage vmotion available. Second, the re-registration creates a new virtual machine ID that is good to workaround the lock, but Veeam Backup sees this VM like a new one thus saving it from scratch.
To re-enable Storage vMotion for the locked VM, we used the third method:
– first, write down the VM ID shown in the previous picture
– stop vCenter services
– take a backup of your SQL database!
– open SQL Management Studio on the server hosting vCenter database (and install Management Studio Express first if you are using SQL Express)
– Run a new query:
– IMPORTANT: select vCenter database, don’t run the query against the default “master” database!
– run this query to confirm the VM is really locked (change ID with the number shown in the error popup)
select * from VPX_DISABLED_METHODS WHERE ENTITY_MO_ID_VAL = ‘vm-ID’
– the query will list the locked VM. Then, to remove the lock run this query:
delete * from VPX_DISABLED_METHODS WHERE ENTITY_MO_ID_VAL = ‘vm-ID’
– close SQL Server Management Studio and restart vCenter services. Now Storage vMotion will start without errors: