Migration option is greyed out or migration of VM fails because vMotion is disabled in vCenter
search cancel

Migration option is greyed out or migration of VM fails because vMotion is disabled in vCenter

book

Article ID: 316570

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

  • The 'Migrate' & 'Power Off' options are unavailable (greyed out) in the vCenter Server for a VM.

    OR

  • A migration initiated in vCenter failed with the error: "Cannot relocate VM XXXX because the action is disabled in vCenter"

Cause

This issue can occur after a virtual machine backup completes and the entries from the vCenter Server database vpx_disabled_methods table are not removed.

For more information on who created the entry run the below command

/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres -c "select * from vpx_disabled_methods;"
 
Note: Executing the command, be sure to add a "; ".
Even if there is no applicable virtual machine, "(0 rows)" is output as follows:

root@vcsa [ ~ ]# /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres -c "select * from vpx_disabled_methods;"
 entity_mo_id_val | method_name | source_id_val | reason_id_val
------------------+-------------+---------------+---------------
(0 rows)

Resolution

 In vCenter UI:

Starting from vCenter Server 8.0 Update 3, In the vSphere Client under Virtual Machine > Configure > Disabled Methods you can remove restrictions on virtual machine operations such as migration.

Click on enable option above disabled methods 

 

 

Manually remove entries from the vCenter Mob:

  1. Identify the VM's MOB ID
    1. Open a web browser to the vCenter Server's Flex (Flash) or vSphere Client (HTML5)
    2. In the left hand side inventory, select the affected VM's object
    3. With the VM selected and highlighted, in the URL bar, review the string and look for "VirtualMachine:vm-xx"

Example:

https://ExamplevCenterFQDNorIP/ui/#?extensionId=vsphere.core.vm.summary&objectId=urn:vmomi:VirtualMachine:vm-141:########-####-####-####-3445fc35c5ba&navigator=vsphere.core.viTree.hostsAndClustersView

In this example VM's MOB ID is vm-141.

  1. ​​​​​​Access the Virtual Machine Operations by opening a web browser to: 

https://ExamplevCenterFQDNorIP/mob/?moid=AuthorizationManager&method=enableMethods

  1. Login with administrator@yourssodomain.local or an SSO admin user.

For example: [email protected]

  1. The below page will appear:

  1. In the first parameter entity value box, replace MOID with the VM's MOB ID

For example:

<!-- array start -->
<entity type="ManagedEntity" xsi:type="ManagedObjectReference">vm-141</entity>
<!-- array end -->


  1. In the second parameter entity value box, enter this command:

<method>RelocateVM_Task</method>


 

  1. Click on Invoke Method

 

  1. Refresh the vCenter Server web client and the migration option for the VM should now be available. If the issues persist: