---
title: Azure – You can now connect your Azure Cloud Shell to a virtual network - cubesys
description: By now you may already know Azure Cloud Shell, available directly from the Azure/Office 365 portals or from the URL https://shell.azure.com, the shell management tool running directly from your web browser.Well, you can now connect Azure Cloud Shell with a virtual network on your Azure tenant; this could be handy…
---

[Latest News & Blogs - cubesys ](https://www.cubesys.com.au/blog)

# [Azure – You can now connect your Azure Cloud Shell to a virtual network - cubesys](https://www.cubesys.com.au/blog/azure-you-can-now-connect-your-azure-cloud-shell-to-a-virtual-network)

 Written by [cubesys](https://www.cubesys.com.au/blog/author/cubesys) | Aug 11, 2020 2:00:00 PM

By now you may already know Azure Cloud Shell, available directly from the Azure/Office 365 portals or from the URL [https://shell.azure.com](https://shell.azure.com/), the shell management tool running directly from your web browser.

<https://www.cubesys.com.au/hubfs/Imported_Blog_Media/image_thumb-277.png>

Well, you can now connect Azure Cloud Shell with a virtual network on your Azure tenant; this could be handy when you have to manage services with **no public** IP address.

To be able to do it you need to deploy a specific template for both the virtual network and the storage account used by Axure Cloud Shell.

Don’t worry you are not create a new virtual network

These templates are available from:

- Virtual Network for Azure Cloud Shell: [https://azure.microsoft.com/en-us/resources/templates/101-cloud-shell-vnet/?WT.mc_id=thomasmaurer-blog-thmaure](https://azure.microsoft.com/en-us/resources/templates/101-cloud-shell-vnet/?WT.mc_id=thomasmaurer-blog-thmaure)
- Storage Account for Azure Cloud Shell connected to a VNet: [https://azure.microsoft.com/en-us/resources/templates/101-cloud-shell-vnet-storage/?WT.mc_id=thomasmaurer-blog-thmaure](https://azure.microsoft.com/en-us/resources/templates/101-cloud-shell-vnet-storage/?WT.mc_id=thomasmaurer-blog-thmaure)

You can also create a full new Cloud Shell storage account and use the option **Show VNET isolation settings**

**NOTE** this is currently only available for **West US** and **West Central US** region for storage account

## Prerequisites

You need to first register the **containerinstances** resource provider using either the Azure portal or the command

> Register-AzureRmResourceProvider -ProviderNamespace Microsoft.ContainerInstance

<https://www.cubesys.com.au/hubfs/Imported_Blog_Media/image_thumb11-21.png>   <https://www.cubesys.com.au/hubfs/Imported_Blog_Media/image_thumb12-11.png> 

## Use the VNET isolation settings

This option is only available for **existing** storage account

You will need to **disconnect** Azure Cloud Shell to be able to use it (see Reconnect Azure Cloud Shell as the end of this post)

<https://www.cubesys.com.au/hubfs/Imported_Blog_Media/image_thumb9-22.png>

## Use the templates

For both just use the **Deploy to Azure** button

<https://www.cubesys.com.au/hubfs/Imported_Blog_Media/image_thumb1-232.png>  <https://www.cubesys.com.au/hubfs/Imported_Blog_Media/image_thumb2-182.png>

As you may know when you deploy such template you will define the subscription and the resource group where the template will be deployed as well as the specific details for each object.

### Deployment of the Virtual Network Template

You will need to use **an existing virtual network name**.

You can get the  **Azure Container Instance OID** using the below command

> Get-AzADServicePrincipal -DisplayNameBeginsWith ‘Azure Container Instance’

Then other settings are self-explanatory.

<https://www.cubesys.com.au/hubfs/Imported_Blog_Media/image_thumb3-143.png>  <https://www.cubesys.com.au/hubfs/Imported_Blog_Media/image_thumb4-113.png>  <https://www.cubesys.com.au/hubfs/Imported_Blog_Media/image_thumb5-72.png>

Once the deployment is completed, you will see the new subnets available in your virtual network and you can now deploy the Storage Account template.

### Deployment of the Storage Account template

You will define the same virtual network and subnets as above

<https://www.cubesys.com.au/hubfs/Imported_Blog_Media/image_thumb6-58.png>

Once completed, you are done.

## Reconnect Azure Cloud Shell

You just need to **reconnect** your Azure Cloud Shell by disconnecting from the storage account using the command

> cloudrive unmount

or

> dismount-cloudrive

<https://www.cubesys.com.au/hubfs/Imported_Blog_Media/image_thumb7-44.png>

Then you can connect again by re selecting the disconnected storage account

<https://www.cubesys.com.au/hubfs/Imported_Blog_Media/image_thumb8-33.png>

[View full post](https://www.cubesys.com.au/blog/azure-you-can-now-connect-your-azure-cloud-shell-to-a-virtual-network)

```json
{
  "@context" : "http://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "cubesys"
  },
  "dateModified" : "2025-02-21T15:17:49.930Z",
  "datePublished" : "2020-08-11T14:00:00Z",
  "headline" : "Azure – You can now connect your Azure Cloud Shell to a virtual network",
  "image" : {
    "@type" : "ImageObject",
    "height" : 60,
    "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
    "width" : 60
  },
  "mainEntityOfPage" : "https://www.cubesys.com.au/blog/azure-you-can-now-connect-your-azure-cloud-shell-to-a-virtual-network",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60,
      "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
      "width" : 60
    },
    "name" : "Latest News"
  }
}
```