Create a virtual network for Azure SQL Database Managed Instance

This article explains how to create a valid virtual network and subnet where you can deploy Azure SQL Database Managed Instance.

Azure SQL Database Managed Instance must be deployed within an Azure virtual network. This deployment enables the following scenarios:

  • Secure private IP address
  • Connecting to a Managed Instance directly from an on-premises network
  • Connecting a Managed Instance to linked server or another on-premises data store
  • Connecting a Managed Instance to Azure resources


You should determine the size of the subnet for Managed Instance before you deploy the first instance. You can't resize the subnet after you put the resources inside.

If you plan to use an existing virtual network, you need to modify that network configuration to accommodate your Managed Instance. For more information, see Modify an existing virtual network for Managed Instance.

After a managed instance is created, moving the managed instance or VNet to another resource group or subscription is not supported.

Create a virtual network

The easiest way to create and configure a virtual network is to use an Azure Resource Manager deployment template.

  1. Sign in to the Azure portal.

  2. Select the Deploy to Azure button:

    This button opens a form that you can use to configure the network environment where you can deploy Managed Instance.


    This Azure Resource Manager template will deploy a virtual network with two subnets. One subnet, called ManagedInstances, is reserved for Managed Instance and has a preconfigured route table. The other subnet, called Default, is used for other resources that should access Managed Instance (for example, Azure Virtual Machines).

  3. Configure the network environment. On the following form, you can configure parameters of your network environment:

    Resource Manager template for configuring the Azure network

    You might change the names of the virtual network and subnets, and adjust the IP ranges associated with your networking resources. After you select the Purchase button, this form will create and configure your environment. If you don't need two subnets, you can delete the default one.

Next steps