question

MilanKop-1682 avatar image
0 Votes"
MilanKop-1682 asked GitaraniSharmaMSFT-4262 commented

Can not edit the Network interface due to Private Endpoint?

My Situation:

1 Virtual Machine with 2 network interfaces:
1. Network interface - 10.10.5.4 with public IP address XXX.XXX.XXX.XXX
2. Network interface - 10.10.5.5 without public IP address

IDK which Network interface is Primary because when I click on the tree dots at the IP configurations on the both NICs:

(ipconfig1 IPv4 Primary Private IP Public IP) ... <- HERE

The option Make primary is greyed out in the both NICs.

I am trying to add public IP to the second NIC (10.10.5.5) but I unable because:

You cannot change the properties of this network interface because it is part of a private link. Learn more

Can someone help me? What is going on here? No primary NIC, and I´m unable to edit the NIC due to some Private Link??? I don´t know what is a Private Link but I checked the Private Links in the Azure and it´s empty!38041-screenshot-464.png


38016-inkedscreenshot-463-li.jpg


azure-virtual-network
· 12
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @MilanKop-1682 ,

Could you please check the subnets under Private Endpoint in Private Link Service within Azure portal to validate if the subnet of this Virtual machine is added there?

37940-privateendpoint.jpg


0 Votes 0 ·
privateendpoint.jpg (32.2 KiB)

Hello @MilanKop-1682 ,

Could you please provide an update on this post?

Thanks,
Gita

0 Votes 0 ·
MilanKop-1682 avatar image MilanKop-1682 GitaraniSharmaMSFT-4262 ·

Hello GitaraniSharmaMSFT-4262,

I checked it before but it is empty:

38313-screenshot-467.png


0 Votes 0 ·
screenshot-467.png (24.3 KiB)

Hello @MilanKop-1682 ,

​I just confirmed the below with the backend team:

Notification message shown in the Azure portal regarding secondary NIC being part of Private Link (even when it is not) is a portal bug, which will be fixed in the next portal update rollout. For now as a workaround, you can make the desired changes using Azure PowerShell or CLI. Please use the below suggested commands and let us know if you face any issues.

Thanks,
Gita

1 Vote 1 ·
Show more comments

Hello @MilanKop-1682 ,

In that case, are you able to use the below commands suggested by @suvasara-MSFT to check the primary NIC and set desired NIC to primary?

Thanks,
Gita

0 Votes 0 ·

Is it possible to change the Name of the Network Interface which is automatically created when creating a private endpoint?

0 Votes 0 ·
GitaraniSharmaMSFT-4262 avatar image GitaraniSharmaMSFT-4262 SordakisMartinaGITPN-5883 ·

Hello @SordakisMartinaGITPN-5883 ,

When creating a private endpoint, a read-only network interface is created for the lifecycle of the resource. The interface is assigned a dynamic private IP address from the subnet that maps to the private link resource. The value of the private IP address remains unchanged for the entire lifecycle of the private endpoint. You cannot change the properties of this network interface because it is part of a private link.
Reference : https://docs.microsoft.com/en-gb/azure/private-link/private-link-faq#can-i-modify-my-private-endpoint-network-interface--nic---

Thanks,
Gita

0 Votes 0 ·

1 Answer

suvasara-MSFT avatar image
1 Vote"
suvasara-MSFT answered

@MilanKop-1682, Agreed that distinguishing between primary NIC from the portal is little bit challenging. We will address update on this shortly. Meanwhile feel free to use these PowerShell commands to identify the Primary Id.

 $VMname = ‘VM-name’
 $VMRG = ‘RG-name’
 $VM = Get-AzureRmVM -Name $VMname -ResourceGroupName $VMRG
 $VM.NetworkProfile.NetworkInterfaces

SS:
37860-image.png

Also, below are the extended commands to set the interested NIC to primary,

 $NewNIC =  Get-AzureRmNetworkInterface -Name new-nic -ResourceGroupName $VMRG
    
 $VM = Add-AzureRmVMNetworkInterface -VM $VM -Id $NewNIC.Id
    
 $VM.NetworkProfile.NetworkInterfaces
    
 $VM.NetworkProfile.NetworkInterfaces.Item(0).Primary = $true
    
 Update-AzureRmVM -VM $VM -ResourceGroupName $VMRG




We will post the reason for greying the out option in IP configuration shortly.


Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.




image.png (44.9 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.