1
1
---
2
2
description : This article provides step-by-step instructions to deploy Azure Cloud Shell in a private virtual network.
3
3
ms.contributor : jahelmic
4
- ms.date : 01/28 /2025
4
+ ms.date : 02/05 /2025
5
5
ms.topic : how-to
6
6
ms.custom : devx-track-arm-template
7
7
title : Deploy Azure Cloud Shell in a virtual network with quickstart templates
8
8
---
9
9
10
- # Deploy Cloud Shell in a virtual network by using quickstart templates
10
+ # Deploy Azure Cloud Shell in a virtual network by using quickstart templates
11
11
12
12
Before you run quickstart templates to deploy Azure Cloud Shell in a virtual network (VNet), there
13
13
are several prerequisites to complete. You must have the ** Owner** role assignment on the
14
- subscription. To view and assign roles, see [ List Owners of a Subscription] [ 10 ] .
14
+ subscription. To view and assign roles, see [ List Owners of a Subscription] [ 05 ] .
15
15
16
16
This article walks you through the following steps to configure and deploy Cloud Shell in a virtual
17
17
network:
@@ -37,7 +37,7 @@ Depending on when your tenant was created, some of these providers might already
37
37
38
38
To see all resource providers and the registration status for your subscription:
39
39
40
- 1 . Sign in to the [ Azure portal] [ 11 ] .
40
+ 1 . Sign in to the [ Azure portal] [ 14 ] .
41
41
1 . On the Azure portal menu, search for ** Subscriptions** . Select it from the available options.
42
42
1 . Select the subscription that you want to view.
43
43
1 . On the left menu, under ** Settings** , select ** Resource providers** .
@@ -80,57 +80,61 @@ Fill in the following values:
80
80
You can create the resource group by using the Azure portal, the Azure CLI, or Azure PowerShell. For
81
81
more information, see the following articles:
82
82
83
- - [ Manage Azure resource groups by using the Azure portal] [ 02 ]
84
- - [ Manage Azure resource groups by using Azure CLI] [ 01 ]
85
- - [ Manage Azure resource groups by using Azure PowerShell] [ 03 ]
83
+ - [ Manage Azure resource groups by using the Azure portal] [ 03 ]
84
+ - [ Manage Azure resource groups by using Azure CLI] [ 02 ]
85
+ - [ Manage Azure resource groups by using Azure PowerShell] [ 04 ]
86
86
87
87
### Create a virtual network
88
88
89
89
You can create the virtual network by using the Azure portal, the Azure CLI, or Azure PowerShell.
90
90
For more information, see the following articles:
91
91
92
- - [ Use the Azure portal to create a virtual network] [ 05 ]
93
- - [ Use Azure PowerShell to create a virtual network] [ 06 ]
94
- - [ Use Azure CLI to create a virtual network] [ 04 ]
92
+ - [ Use the Azure portal to create a virtual network] [ 07 ]
93
+ - [ Use Azure PowerShell to create a virtual network] [ 08 ]
94
+ - [ Use Azure CLI to create a virtual network] [ 06 ]
95
95
96
96
> [ !NOTE]
97
97
> When you're setting the container subnet address prefix for the Cloud Shell subnet, it's important
98
98
> to consider the number of Cloud Shell sessions that you need to run concurrently. If the number of
99
99
> Cloud Shell sessions exceeds the available IP addresses in the container subnet, users of those
100
100
> sessions can't connect to Cloud Shell. Increase the container subnet range to accommodate your
101
101
> specific needs. For more information, see the "Change subnet settings" section of
102
- > [ Add, change, or delete a virtual network subnet] [ 07 ] .
102
+ > [ Add, change, or delete a virtual network subnet] [ 09 ] .
103
103
104
104
### Get the Azure container instance ID
105
105
106
106
The Azure container instance ID is a unique value for every tenant. You use this identifier in the
107
- [ quickstart templates] [ 08 ] to configure a virtual network for Cloud Shell. To get the Id from the
108
- command line, see [ Alternate way to get the Azure Container Instance ID] [ 12 ] .
107
+ [ quickstart templates] [ 12 ] to configure a virtual network for Cloud Shell. To get the ID from the
108
+ command line, see [ Alternate way to get the Azure Container Instance ID] [ 10 ] .
109
109
110
- 1 . Sign in to the [ Azure portal] [ 11 ] . From the home page, select ** Microsoft Entra ID** . If the icon
110
+ 1 . Sign in to the [ Azure portal] [ 14 ] . From the home page, select ** Microsoft Entra ID** . If the icon
111
111
isn't displayed, enter ` Microsoft Entra ID ` in the top search bar.
112
112
1 . On the left menu, select ** Overview** . Then enter ` azure container instance service ` in the
113
113
search bar.
114
114
115
115
[ ![ Screenshot of searching for Azure Container Instance Service.] [ 95a ]] [ 95b ]
116
116
117
117
1 . In the results, under ** Enterprise applications** , select ** Azure Container Instance Service** .
118
- 1 . On the ** Overview** page for ** Azure Container Instance Service** , find the ** Object ID** value
119
- that's listed as a property .
118
+ 1 . On the ** Overview** page for ** Azure Container Instance Service** , locate the ** Object ID** value
119
+ listed under ** Properties ** .
120
120
121
121
You use this ID in the quickstart template for the virtual network.
122
122
123
123
[ ![ Screenshot of Azure Container Instance Service details.] [ 96a ]] [ 96b ]
124
124
125
125
## 3. Create the required network resources by using the ARM template
126
126
127
- Use the [ Azure Cloud Shell - VNet] [ 08 ] template to create Cloud Shell resources in a virtual
128
- network. The template creates three subnets under the virtual network that you created earlier. You
129
- might choose to change the supplied names of the subnets or use the defaults.
127
+ To create Cloud Shell resources in a virtual network, use the ARM template named
128
+ [ Azure Cloud Shell - VNet] [ 12 ] . The template creates three subnets under the virtual network that
129
+ you created earlier. You might choose to change the supplied names of the subnets or use the
130
+ defaults.
130
131
131
- The virtual network, along with the subnets, requires valid IP address assignments. You need at
132
- least one IP address for the Relay subnet and enough IP addresses in the container subnet to support
133
- the number of concurrent sessions that you expect to use.
132
+ The virtual network and the subnets require valid IP address assignments. You need enough addresses
133
+ to support the following resources:
134
+
135
+ - At least one IP address for the Relay subnet
136
+ - Enough IP addresses in the container subnet to support the number of concurrent sessions that you
137
+ expect to use
134
138
135
139
The ARM template requires specific information about the resources that you created earlier, along
136
140
with naming information for new resources. This information is filled out along with the prefilled
@@ -176,8 +180,9 @@ subscription.
176
180
177
181
## 4. Create the virtual network storage by using the ARM template
178
182
179
- Use the [ Azure Cloud Shell - VNet storage] [ 09 ] template to create Cloud Shell resources in a virtual
180
- network. The template creates the storage account and assigns it to the private virtual network.
183
+ To create Cloud Shell resources in a virtual network, use the ARM template named
184
+ [ Azure Cloud Shell - VNet storage] [ 13 ] . The template creates the storage account and assigns it to
185
+ the private virtual network.
181
186
182
187
The ARM template requires specific information about the resources that you created earlier, along
183
188
with naming information for new resources.
@@ -275,21 +280,29 @@ az ad sp list --display-name 'Azure Container Instance' --query "[].id"
275
280
## Next steps
276
281
277
282
You must complete the Cloud Shell configuration steps for each user who needs to use the new private
278
- Cloud Shell instance.
283
+ Cloud Shell instance. Alternatively, you can configure your Cloud Shell instance to allow multiple
284
+ users to use the same storage resources. For more information, see
285
+ [ Allow multiple users to use a single storage account and file share] [ 01 ] .
286
+
287
+ For improved security, you can configure your storage account to use a private endpoint. For more
288
+ information, see [ Connect to a storage account using an Azure private endpoint] [ 11 ] .
279
289
280
290
<!-- link references -->
281
- [ 01 ] : /azure/azure-resource-manager/management/manage-resource-groups-cli
282
- [ 02 ] : /azure/azure-resource-manager/management/manage-resource-groups-portal
283
- [ 03 ] : /azure/azure-resource-manager/management/manage-resource-groups-powershell
284
- [ 04 ] : /azure/virtual-network/quick-create-cli
285
- [ 05 ] : /azure/virtual-network/quick-create-portal
286
- [ 06 ] : /azure/virtual-network/quick-create-powershell
287
- [ 07 ] : /azure/virtual-network/virtual-network-manage-subnet?tabs=azure-portal#change-subnet-settings
288
- [ 08 ] : https://aka.ms/cloudshell/docs/vnet/template
289
- [ 09 ] : https://azure.microsoft.com/resources/templates/cloud-shell-vnet-storage/
290
- [ 10 ] : /azure/role-based-access-control/role-assignments-list-portal#list-owners-of-a-subscription
291
- [ 11 ] : https://portal.azure.com
292
- [ 12 ] : #alternate-way-to-get-the-azure-container-instance-id
291
+ [ 01 ] : ../security/how-to-support-multiple-users.md
292
+ [ 02 ] : /azure/azure-resource-manager/management/manage-resource-groups-cli
293
+ [ 03 ] : /azure/azure-resource-manager/management/manage-resource-groups-portal
294
+ [ 04 ] : /azure/azure-resource-manager/management/manage-resource-groups-powershell
295
+ [ 05 ] : /azure/role-based-access-control/role-assignments-list-portal#list-owners-of-a-subscription
296
+ [ 06 ] : /azure/virtual-network/quick-create-cli
297
+ [ 07 ] : /azure/virtual-network/quick-create-portal
298
+ [ 08 ] : /azure/virtual-network/quick-create-powershell
299
+ [ 09 ] : /azure/virtual-network/virtual-network-manage-subnet?tabs=azure-portal#change-subnet-settings
300
+ [ 10 ] : #alternate-way-to-get-the-azure-container-instance-id
301
+ [ 11 ] : how-to-use-private-endpoint-storage.md
302
+ [ 12 ] : https://aka.ms/cloudshell/docs/vnet/template
303
+ [ 13 ] : https://azure.microsoft.com/resources/templates/cloud-shell-vnet-storage/
304
+ [ 14 ] : https://portal.azure.com
305
+
293
306
[ 95a ] : media/deployment/container-service-search.png
294
307
[ 95b ] : media/deployment/container-service-search.png#lightbox
295
308
[ 96a ] : media/deployment/container-service-details.png
0 commit comments