Some days back I had to create multiple Managed Instances in different resource groups for a client, by default Azure Portal give the below option for choosing network.
I went through all the default options for the Networking and built 3 MIs. MI-dev, MI-test and MI-prd.
MI-dev was the first MI that I had created and tested the connection with the admin account. It was working fine (had enabled public endpoint too).
When test and prd MI were deployed and made available, to my surprise, I was not able to connect to them even by using the admin account. I was getting the usual Server not found Network error in SSMS.
After checking all the resources I realized that Azure creates the VM every time in the same VNet and Subnet address space. Which is 10.0.0.0/16 for VNet and 10.0.0.0/24 for Subnet.
This was causing the IP conflicts for the VNet in different Resource Groups and so I was not able to connect to MI.
As Azure doesn’t provide the option to provide the Address space for the VNet it creates during Managed Instance deployment. I created a VNet and Subnet in a different address space and when creating the Managed Instance provided the newly created subnet to it.
All the configurations required for the MI to work like route-tables and service provider is done by Azure itself, as long we provide the VNet and Subnet (I named the subnet ManagedInstance only as it is this what Azure names it).