Trying to create a VM to acess a SQL Azure Managed Instance - (The selected subnet is not supported)

1.6k views Asked by At

I have created an Azure SQL Managed Instance but I am unable to create a VM to connect to it as I need to put it on the same Subnet.

When I try to do so I am not given the option. I can select the virtual network that was created with my Managed Instance but when I attempt to select the 'ManagedInstance' Subnet it's greyed out...

ManagedInstance (10.0.0.0/24) (The selected subnet is not supported)

Looking at the vnet (created automatically when I set up my managed instance) it's Address space is clashing but I can't change the Address space because the subnet is using it - I can't change the subnet because the range isn't in the address space (and so on and so forth)

I seem to be stuck in a chicken / egg nightmare

I don't know what other info I can give at this time.

2

There are 2 answers

1
Rizwan On BEST ANSWER

With new Azure SQL MI deployments, the subnet for MI is reserved for MI and you should keep it that way. Create the VM on a different subnet within the same VNET.

One the of challenges that I have seen putting resources in the same subnet as MI is that MI requires at least 8 IP addresses. Best practice dictates to keep at least 16 IP available for MI.

These are some resources for some visibility

https://learn.microsoft.com/en-us/azure/azure-sql/managed-instance/virtual-network-subnet-create-arm-template

https://learn.microsoft.com/en-us/azure/azure-sql/managed-instance/vnet-subnet-determine-size

0
Keith Jackson On

The VM and the Managed Instance need to be on the same VNET but not on the same Subnet - You need to create a separate subnet for each to live on.

The clashing Address space was a nasty one though - I couldn't find a fix for that and had to tear down everything and start again with a new VNET which I created before deploying the Managed Instance.