"The method is disabled by 'horizon, daas'" error when deleting templates and VM Folders from the vCenter
search cancel

"The method is disabled by 'horizon, daas'" error when deleting templates and VM Folders from the vCenter

book

Article ID: 379018

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

You cannot delete a VM folder from the vCenter UI, getting an error "The method is disabled by 'horizon.daas'. "

You may also have VM templates in this folder, showing no actions in their contextual menu except for a greyed out "Remove from inventory" option:

Environment

vCenter 7.x, 8.x

Cause

VDI templates and VM folders created by VMware Horizon cannot be deleted directly through the vCenter Server. The error message indicates that these objects 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 should be as follows, listing 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 following query: 

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

  2. Connect to the MOB Page

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

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

     5. The following page is shown : 

     

   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 to use in the MOB UI 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 object.

 

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. Please take an offline snapshot of each vCenter if the vCenters are in linked mode.

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 object.