Edit Protected VMs in vSphere

Reading Time: 2 minutes

You can see that many object in vSphere are protected due to design or due to other software like VMWare Horizon that prevent editing. In case of faulted componets or some other reason you shoul have orphaned and uneditable VMs.

How can we soldi this problem? Just followind this steps

Connect with web browser to https://<vcsa>/mob

Click in content and then rootFolder

Then click on childEntity

Then search for vmFolder

Under childEntity check the vm-id

If you want to remove VM with id vm-51 just do the following steps:

Connect to vCenter with SSH and enable shell access

shell

Connect to the vCenter Server’s Postgres Database
/opt/vmware/vpostgres/current/bin/psql -U postgres

Connect to the VCDB.
\connect VCDB
Do not forget the \ before connect

Show all protected objects running the following command
select * from VPX_DISABLED_METHODS;

This image has an empty alt attribute; its file name is image-5.png

Delete the entry for the VM you wish to edit
delete from VPX_DISABLED_METHODS where entity_mo_id_val = ‘MO_ID’;

This image has an empty alt attribute; its file name is image-6.png

And finally restart the vCenter Server Service

service-control –stop vmware-vpxd

service-control –start vmware-vpxd

After that you can click in the VM and remove from inventory

Check Out koodzo.com!