"The method is disabled by 'horizon, dass'" Unable to delete VM Folders from the vCenter.
search cancel

"The method is disabled by 'horizon, dass'" Unable to delete VM Folders from the vCenter.

book

Article ID: 379018

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

We cannot delete VM folder from the vCenter and get an error " "The method is disabled by 'horizon, dass'. 

 

Environment

vCenter 7.x, 8.x

Cause

VM folders created by VMware Horizon cannot be deleted directly through the vCenter Server. The error message indicates that these folders are protected by default settings within VMware Horizon. To confirm this, you can query the vCenter database for disabled methods associated with the VM folders. Use the following command:

/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres -c "select * from vpx_disabled_methods;"

The output will be as follows : 

 

 

The output will list the details of the managed object (MOB) ID of the object and the operations that are currently disabled.

Resolution

Option 1: Manually Remove Entries from the vCenter MOB

  1. Identify the MOB ID

    • You can retrieve the MOB ID from the output of the query executed above.
  2. Connect to the MOB Page

  3.  https://<vCenterFQDNorIP>/mob/?moid=AuthorizationManager&method=enableMethods 

  4. Log in with your administrator credentials (e.g., [email protected] or an SSO admin user).

     5. Below page will appear : 

     

   6. In the first parameter entity value box, replace MOBID with the actual MOB ID you identified earlier. 

   7. In the second parameter method value box, enter the method name corresponding to the task you want to perform, as noted in the output from the database query.

 

      

The syntax for the same is  <method>taskfromthelistabove</method>

8. Click on Invoke Method.

9. After invoking the method, refresh the vCenter Server web client. You should now be able to delete the VM folder.

 

 

 

Option 2: Remove from the Database

Caution: This procedure modifies the database. Ensure to take a full backup of the existing database before proceeding with any of these options. Involve a Database Administrator if there is any difficulty with these steps.


Before proceeding, ensure you take a snapshot of your vCenter to prevent data loss and take a back of the vCenter as well. 

Caution: This procedure modifies the database. Ensure to take a full backup of the existing database before proceeding with any of these options. Involve a Database Administrator if there is any difficulty with these steps.


Before proceeding, ensure you take a snapshot of your vCenter to prevent data loss and take a back of the vCenter as well. 

1. Use an SSH client to connect to your vCenter server.

2. Stop the vCenter service by running the following command:

   service-control --stop vpxd

3. To find all objects that are causing the issue, execute the following command:

   /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres -c "select * from vpx_disabled_methods;"

4. Remove the Affected Object

   Identify the ID of the affected object from the previous command’s output. Then run the following command to remove it:

   /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres -c "delete from vpx_disabled_methods where entity_mo_id_val ='ID';"


5. Start the vpxd service:

  service-control --start vpxd


We should now be able to remove the folder.