When “Life and Death” Power Ends Up in the Wrong Hands: A 2 AM Story
That night, my phone buzzed incessantly on the desk. On the other end, a junior sobbed: “Sir, the production DB is gone, I can’t find it in the Inventory anymore!”. Yawning while opening my laptop, I checked the Tasks & Events section on vCenter and realized the harsh truth. He intended to adjust the network card for a test VM, but because he held supreme Administrator privileges, he accidentally clicked ‘Delete from Disk’ on the most critical DB in the system.
The result? It took me nearly 4 hours to restore the data from a Veeam backup. This was a painful lesson about laziness in permission management. Currently, I manage a VMware cluster with 8 ESXi hosts and over 150 VMs. If you don’t tighten Role-Based Access Control (RBAC), such silly operational errors will sooner or later get you fired. RBAC isn’t just about setting passwords; it’s the art of granting enough permission to work but not enough to cause disaster.
Comparing 3 Approaches to Access Management
Before diving into configuration, you should look at 3 common approaches to see why RBAC combined with an Identity Source is the only choice for a professional environment.
- Shared Administrator account: This is a disaster waiting to happen. Everyone shares the
[email protected]user. The only advantage is speed, but you’ll never know who did what (Audit trail is zero). One mistake, and the whole team takes the blame. - Local Users on each Host: This works if you only have 1-2 standalone hosts. However, as the number of hosts grows, logging in 8 times to 8 different servers to change a password for a new employee is a total nightmare.
- RBAC with AD/LDAP: This is what I use. vCenter connects directly to Active Directory. We assign permissions based on AD Groups. When an employee leaves, you just disable their AD account—clean and secure.
Pros and Cons: Is It Really All Sunshine and Roses?
Immediate Benefits
The greatest strength of RBAC is **Granularity**. You can allow the Dev team to Power On/Off VMs but strictly forbid them from modifying RAM/CPU configurations. Or the Network team can only touch Virtual Switches without accessing Datastores. Additionally, **Inheritance** helps you apply permissions from the Datacenter level down to dozens of VM Folders below in just 30 seconds.
Drawbacks to Consider
In practice, RBAC can sometimes drive admins crazy with its initial complexity. If you don’t organize VM Folders properly, permission assignments will overlap. Sometimes a user belongs to two different AD Groups, leading to permission conflicts. In such cases, you might spend an entire afternoon just debugging why a user can’t power on a VM.
3-Step Implementation: From Theory to Practice
To configure correctly, I always follow the formula: Identity Source -> Define Roles -> Assign Permissions.
Step 1: Connect to Active Directory
Never create users manually. Go to Administration > Single Sign-On > Configuration to add your corporate Domain. Once successfully joined, you can find any colleague right in the vCenter interface just by typing their name.
Step 2: Set Up Custom Roles – Don’t Use Default Ones
VMware comes with built-in roles like VM Power User or ReadOnly. But believe me, they are usually too much or too little.
I usually create specific roles for each team. For example, for a “Junior-Operator” role, I only check 3 permission groups:
- Interaction: Power on, Power off, Console.
- Inventory: Create from existing (to clone VMs from Templates).
- Snapshot management: So they can take snapshots themselves before updating code.
Step 3: Assign Permissions Using the “Least Privilege” Principle
This is where we link: User + Role + Object. Suppose I want to grant permissions to the Dev_Team group on the Project_Alpha folder.
- Right-click the
Project_Alphafolder. - Select Add Permission.
- In the User section, select the Domain and type
Dev_Team. - In the Role section, select the
Junior-Operatorrole created above. - Don’t forget to check Propagate to children so the permissions automatically apply to all VMs inside that folder.
Automation with PowerCLI
If you have hundreds of VMs, clicking manually is impossible. I often use PowerCLI scripts for bulk permission assignments, saving about 80% of the time. Here is the code snippet I frequently use to control permissions:
# Connect to vCenter
Connect-VIServer -Server vcenter.itfromzero.com
# Check permissions for user 'hoang.admin'
Get-VIPermission | Where-Object {$_.Principal -like "*hoang.admin*"} | Select-Object Entity, Role, Principal
# Quickly assign permissions for a Group to a VM Folder
New-VIPermission -Entity (Get-Folder "Production_VMs") -Principal "DOMAIN\Group_Admins" -Role "Admin_Role" -Propagate:$true
4 Survival Tips for Managing Large Clusters
After many years of “battling” with vCenter systems large and small, I’ve drawn some practical experience:
- Mandatory use of VM Folders: Never assign permissions directly to individual VMs. Group them into folders by project. When a new VM is created, just drop it into the folder, and permissions will be inherited automatically.
- Never assign permissions to individuals: Assign permissions to AD Groups. When a new employee arrives, just add them to the AD Group, and vCenter will recognize them automatically—no need to touch the vCenter configuration.
- Be careful with Global Permissions: These affect the entire system from Licensing to Tagging. Only grant them to those who are truly “Core Admins”.
- Always double-check: After configuring, borrow a test account to try logging in. Ensure the “Delete” button is grayed out for those without authorization.
Permission management is a quiet but crucial task. Don’t wait for an incident to scramble and tighten your processes. I hope these insights from my real-world cluster operations help you avoid those 2 AM phone calls!

