Hello
As I understand, within a resource group, multiple VNets are allowed to have overlapping address spaces. For example, within a given subscription and resource group, I could have:
VNet1: 192.168.0.0/16 containing subnet: 192.168.1.0/24 containing VM1 with internal IP: 192.168.1.4
VNet2: 192.168.0.0/16 containing subnet: 192.168.1.0/24 containing VM1 with internal IP: 192.168.1.4
VNet3: 192.168.0.0/16 containing subnet: 192.168.1.0/24 containing VM1 with internal IP: 192.168.1.4
and so on and so forth but within subscription limits.
Noted that the Azure portal will throw out a warning for overlapping VNet address spaces, but will nevertheless accept the configuration as valid.
Every VM1 gets a unique static external IP address used for RDP. Please see diagram.
Problem: I am not able to RDP into any of the VM1s except the first created. This happens although every VM1 was created with identical configuration.
Ask:
1. Is this really a valid and supported configuration in Azure?
2. If valid, why I am not able to RDP into any of the VM1s except the first created VM1?
BTW, I performed troubleshooting steps as described below and nothing exceptional turned up:
https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-troubleshoot-rdp-connection?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json
https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-windows-detailed-troubleshoot-rdp?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json
Setup:
ARM Template used to create the setup:
{"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json","contentVersion": "1.0.0.0","parameters": {"Number of students": {"type": "int","metadata": {"description": "Number of students" } } },"resources": [ {"apiVersion": "2016-03-30","type": "Microsoft.Network/publicIPAddresses","name": "[concat('vm1-PublicIP-Student-',copyIndex())]","Comments": "vm1 Public IP Address","location": "[resourceGroup().location]","properties": {"publicIPAllocationMethod": "Static" },"copy": {"name": "PublicIPAddressCounter","count": "[parameters('Number of students')]" } }, {"apiVersion": "2016-03-30","type": "Microsoft.Network/networkSecurityGroups","name": "[concat('NetworkSecurityGroup-Student-',copyIndex())]","location": "[resourceGroup().location]","Comments": "Network Security Group one per student","properties": {"securityRules": [ {"name": "default-allow-rdp","properties": {"description": "Allow RDP","protocol": "Tcp","sourcePortRange": "*","destinationPortRange": "3389","sourceAddressPrefix": "*","destinationAddressPrefix": "*","access": "Allow","priority": 1000,"direction": "Inbound" } }, {"name": "allow-port-443","properties": {"description": "Allow HTTPS","protocol": "Tcp","sourcePortRange": "*","destinationPortRange": "443","sourceAddressPrefix": "*","destinationAddressPrefix": "*","access": "Allow","priority": 1001,"direction": "Inbound" } } ] },"copy": {"name": "NetworkSecurityGroupCounter","count": "[parameters('Number of students')]" } }, {"apiVersion": "2016-03-30","type": "Microsoft.Network/virtualNetworks","name": "[concat('VirtualNetwork-Student-',copyIndex())]","location": "[resourceGroup().location]","Comments": "Virtual Network - One Per Student","dependsOn": [ "NetworkSecurityGroupCounter" ],"properties": {"addressSpace": { "addressPrefixes": [ "192.168.0.0/16" ] },"subnets": [ {"name": "[concat('SubNet-Student-',copyIndex())]","properties": {"addressPrefix": "192.168.1.0/24","networkSecurityGroup": {"id": "[resourceId('Microsoft.Network/networkSecurityGroups',concat('NetworkSecurityGroup-Student-', copyIndex()))]" } } } ] },"copy": {"name": "VirtualNetworkCounter","count": "[parameters('Number of students')]" } }, {"apiVersion": "2016-03-30","type": "Microsoft.Network/networkInterfaces","name": "[concat( 'vm1-NetworkInterface-Student-',copyIndex())]","location": "[resourceGroup().location]","dependsOn": [ "PublicIPAddressCounter", "VirtualNetworkCounter" ],"properties": {"ipConfigurations": [ {"name": "ipconfig1","properties": {"privateIPAllocationMethod": "Static","privateIPAddress": "192.168.1.4","publicIPAddress": {"id": "[resourceId('Microsoft.Network/publicIPAddresses', concat('vm1-PublicIP-Student-',copyIndex()))]" },"subnet": {"id": "[concat( resourceId('Microsoft.Network/virtualNetworks', concat('VirtualNetwork-Student-',copyIndex())),'/subnets/SubNet-Student-',copyIndex())]" } } } ] },"copy": {"name": "NetworkInterfaceCounter","count": "[parameters('Number of students')]" } }, {"apiVersion": "2016-03-30","type": "Microsoft.Compute/virtualMachines","name": "[concat( 'vm1-VM-Student-', copyIndex())]","location": "[resourceGroup().location]","dependsOn": [ "PublicIPAddressCounter", "NetworkInterfaceCounter" ],"properties": {"hardwareProfile": { "vmSize": "Standard_DS3_V2" },"storageProfile": {"osDisk": {"name": "[concat('vm1-OSDisk-Student-', copyIndex())]","osType": "Windows","createOption": "Attach","caching": "ReadWrite","vhd": {"uri": <URI goes here> } },"dataDisks": [ {"name": "[concat('vm1-DataDisk-Student-', copyIndex())]","lun": 0,"CreateOption": "Attach","caching": "None","vhd": {"uri": <URI goes here> } } ] },"networkProfile": {"networkInterfaces": [ {"id": "[resourceId('Microsoft.Network/networkInterfaces', concat( 'vm1-NetworkInterface-Student-',copyIndex()))]" } ] } },"copy": {"name": "VirtualMachineCounter","count": "[parameters('Number of students')]" } } ] }
Thank you very much!
Sada Kubsad