This issue has been resolved in vCenter Server 6.7 U1b/EP6, you can download the vCenter Server 6.7U1b VMware Downloads.
Workaround:
Caution: Please take snapshots of the vCenter server before we proceed further.
To workaround this issue, re-order the permission list using one of the method below:
Manual Method:
- Find the permission entry list of Root object from vpx_access table and make a note of all entries with entity_id IS 1 and role_id IS NOT -1 above the first role_id -1 in the list
/opt/vmware/vpostgres/current/bin/psql -U postgres -d VCDB -c "select * from VPX_ACCESS where entity_id = '1';"
select * from VPX_ACCESS where entity_id = '1'
select * from VPX_ACCESS where entity_id = '1'
Example:
# /opt/vmware/vpostgres/current/bin/psql -U postgres -d VCDB -c "select * from VPX_ACCESS where entity_id = '1';"
id | principal | role_id | entity_id | flag | surr_key
------+-------------------------------------+-----------+-----------+------+----------
xx| VSPHERE.LOCAL\user_details | 721420390 | 1 | 3 | 2
yy| VSPHERE.LOCAL\Administrator | -1 | 1 | 1 | 103
(2 rows)
Expected : Root object (entity_id 1) should have a user with role_id -1 as first in the list.
- Remove and re-add all entries with entity_id IS 1 and role_id IS NOT -1 to re-order the list:
- From vSphere Web Client Host and Clusters Navigator, select the vCenter Server object (Root of the inventory)
- Go to permissions tab
- Note the role of User/Groups identified in step 1
- Remove the permission
- Re-add the permission back
- Validate the permission order from Database:
/opt/vmware/vpostgres/current/bin/psql -U postgres -d VCDB -c "select * from VPX_ACCESS where entity_id = '1';"
select * from VPX_ACCESS where entity_id = '1'
-
On MS SQL:
select * from VPX_ACCESS where entity_id = '1'
Example:
# /opt/vmware/vpostgres/current/bin/psql -U postgres -d VCDB -c "select * from VPX_ACCESS where entity_id = '1';"
id | principal | role_id | entity_id | flag | surr_key
------+-------------------------------------+-----------+-----------+------+----------
yy| VSPHERE.LOCAL\Administrator | -1 | 1 | 1 | 103
zz| VSPHERE.LOCAL\user_details | 721420390 | 1 | 2 | 104
(2 rows)
- After this re-order, new permissions added will be available even after vCenter Server Service restart.
Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.
Automated Method for vCenter Server Appliance:
- Copy the attached script restore_permissions.sh to vCenter Server Appliance
- Add execution privilege for the script:
chmod +x restore_permissions.sh
- Execute the script
./restore_permissions.sh <current administrator> <desired full administator>
<current administrator> - Existing user who has Administrator privilege on vCenter Server to make privilege changes
<desired full administator> - The user who has existing privilege entry on vCenter Server and should be the desired Root Object Administrator to re-order and bring on top