We cannot delete VM folder from the vCenter and get an error " "The method is disabled by 'horizon, dass'.
vCenter 7.x, 8.x
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.
Identify the MOB ID
Connect to the MOB Page
https://<vCenterFQDNorIP>/mob/?moid=AuthorizationManager&method=enableMethods
[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.
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.