Skip to content

Commit 2d68f70

Browse files
committed
Add serial console role
1 parent c9663e0 commit 2d68f70

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

articles/virtual-machines/troubleshooting/serial-console-overview.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,37 @@ Serial Console is available for virtual machine scale sets, accessible on each i
6363

6464
![Linux virtual machine scale set Serial Console](./media/virtual-machines-serial-console/vmss-start-console.gif)
6565

66+
## Serial Console RBAC role
67+
As mentioned above, Serial Console requires VM Contributor or greater access to your VM or VM scale set. If you do not want to grant VM Contributor to a user but still want to enable a user to access Serial Console, you may do so with the following role:
68+
69+
```
70+
{
71+
"Name": "Serial Console Role",
72+
"IsCustom": true,
73+
"Description": "Role for Serial Console Users that provides significantly reduced access than VM Contributor",
74+
"Actions": [
75+
"Microsoft.Compute/virtualMachines/*/write",
76+
"Microsoft.Compute/virtualMachines/*/read",
77+
"Microsoft.Storage/storageAccounts/*"
78+
],
79+
"NotActions": [],
80+
"DataActions": [],
81+
"NotDataActions": [],
82+
"AssignableScopes": [
83+
"/subscriptions/<subscriptionId>"
84+
]
85+
}
86+
```
87+
88+
### To create and use the role:
89+
* Save the JSON at a known location – e.g. ~/serialconsolerole.json.
90+
* Use the following Az CLI command to create the role definition: az role definition create --role-definition serialconsolerole.json -o=json
91+
* If you need to update the role, use the following command: az role definition update --role-definition serialconsolerole.json -o=json
92+
* The role will show up in Access Control (IAM) in the portal (may take a few minutes to propagate)
93+
* You may add users to the VM and the boot diagnostics storage account with the custom role role
94+
* Note that the user must be granted the custom role on the VM *and* the boot diagnostics storage account
95+
96+
6697
## Advanced uses for Serial Console
6798
Aside from console access to your VM, you can also use the Azure Serial Console for the following:
6899
* Sending a [system request command to your VM](./serial-console-nmi-sysrq.md)

0 commit comments

Comments
 (0)