Storage vMotion error: the method is disabled

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:

svMotion Method Disabled

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:

New query in SQL Server Management Studio

– IMPORTANT: select vCenter database, don’t run the query against the default “master” database!

Select the right 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:

Finally svMotion works!

Errore in Storage vMotion: the method is disabled

Ho recentemente aggiornato la parte storage di un’infrastruttura vSphere presso un cliente, installando una SAN più performante. Essendo il cliente dotato di licenze vSphere che comprendono Storage vMotion, ho provveduto a spostare le varie virtual machine dal vecchio al nuovo storage senza interrompere l’attività delle VM stesse.

In un paio di virtual machine, l’operazione di migrazione non era possibile, e vCenter restituiva questo errore:

svMotion Method Disabled

Ho fatto quindi una rapida ricerca della stringa di errore ” The method in disabled by ‘vm’ ” e mi sono imbattuto in due articoli:

KB 2008957 sulla knowledge base di VMware

questo post nei forum di Veeam, che rimandava allo stesso articolo VMWare

L’errore infatti riguarda in parte anche il software di backup in uso, anche se alla fine il problema è di VMware: VMware richiede che qualsiasi programma che utilizzi le librerie VADP per effettuare i backup (come Veeam nel caso di questo cliente) esegua una chiamata per disabilitare Storage vMotion sulla virtual machine oggetto del backup. Questo è un comportamento intelligente, dato che un’attività di Storage vMotion durante un backup porterebbe a errori e problemi.

La causa dell’errore indicato prima risiede nel fatto che, per motivi non precisati e senza una reale motivazione riproducibile, a volte vCenter non registra correttamente la segnalazione di backup ultimato da parte del software di backup, e la virtual machine continua ad avere disabilitata la possibilità di subire una Storage vMotion.

Per risolvere questo problema, esistono vari metodi, indicati nell’articolo VMware. Il primo metodo (eseguire un nuovo backup e verificare se il blocco viene tolto) nel nostro caso non era utilizzabile perchè i backup erano stati disabilitati proprio per poter completare durante il weekend la migrazione al nuovo storage, anche se è il più sicuro e meno invasivo. Il secondo metodo (deregistrare e registrare nuovamente la VM) non mi piace per nulla: innanzitutto bisogna spegnere la virtual machine, vanificando nel mio caso il possedere licenze enterprise con tanto di storagevmotion in dotazione. Inoltre, è vero che una nuova registrazione assegna un nuovo ID alla virtual machine e quindi si aggira il blocco nel database, ma usando Veeam per i backup, la virtual machine compare come nuova e si reinizializza la catena di backup di questa VM.

Per riabilitare Storage vMotion per questa virtual machine, abbiamo quindi utilizzato il terzo metodo, in questo modo:

– come indicato nell’immagine sopra, annotarsi il numero di virtual machine, così come è registrata nel database di vCenter (quello indicato a video è l’ID della VM)
– arrestare il servizio vCenter
– effettuare per sicurezza un backup del database SQL!
– avviare SQL Management Studio sul server che ospita il database di vCenter (installare prima Management Studio Express se si sta usando SQL Express)
– Avviare una nuova query:

New query in SQL Server Management Studio

– IMPORTANTE: selezionate il database di vCenter, la nuova query per default viene eseguita sul database master!

Select the right database!

– eseguite questa query per confermare che la VM in oggetto è bloccata (sostituite il valore ID con quello indicato a video nell’errore iniziale)
select * from VPX_DISABLED_METHODS WHERE ENTITY_MO_ID_VAL = ‘vm-ID’

– il risultato della query restituirà la virtual machine bloccata. A questo punto, per togliere il blocco eseguite questa query:
delete * from VPX_DISABLED_METHODS WHERE ENTITY_MO_ID_VAL = ‘vm-ID’

– chiudete SQL Server Management Studio e riavviate i servizi vCenter. A questo punto Storage vMotion verrà eseguita senza errori:

Finally svMotion works!

One thought on “Errore in Storage vMotion: the method is disabled

  1. Mi sono imbattuto nella stessa problematica con un Vcenter Virtual Appliance, e dopo aver effettuato il backup con Veeam della VA, ho potuto effettuare la Storage vMotion senza Errori.
    Paolo Pighetti

Comments are closed.