VM with Multiple NICs - Can't Access IPs on NIC 2 and NIC 3 RRS feed

  • Question

  • Hi, we used an ARM template to create a  Windows VM with 3 NICs. Each NIC has one public and one private IP address. The template specifies "primary = true" for the first NIC and "primary = false" for the other two. I am not able to access the VM from the public IPs on Nic 2 and Nic 3. Here are some facts.

    1.) When I run the command below on each of the NICs, they all show "primary = true"     $MyNIC.IpConfigurations | Format-Table Name, PrivateIPAddress, PublicIPAddress, Primary 
    2.) I run this command to set NIC 1 and NIC 2 to "primary = false"
        $vm = Get-AzureRmVM -Name $vmName -ResourceGroupName $rgVMName
        $vm.NetworkProfile.NetworkInterfaces.Item(1).Primary = $false
        $vm.NetworkProfile.NetworkInterfaces.Item(2).Primary = $false
    3.) I rerun the command below on each NIC and they all still show "primary = true"
        $MyNIC.IpConfigurations | Format-Table Name, PrivateIPAddress, PublicIPAddress, Primary
    4.) All NICs are on the same subnet
    5.) The NSG is at the subnet level6.) From the bastion server in the same VNet I can ping them private IP of NIC 1 but not the private IPs of NIC 2 and NIC 3.

    Do you think the fact that all NICs show "primary = true" is my problem. And if so, how do I fix it? Thanks for any help!

    - Jonathan

    Monday, May 8, 2017 7:19 PM


  • Resolved. For others who may be facing the same issue. We had to perform step 3 in this link to add the IPs to the VM OS.
    Tuesday, May 9, 2017 8:11 PM

All replies