Quantcast
Channel: Azure Networking (DNS, Traffic Manager, VPN, VNET) forum
Viewing all articles
Browse latest Browse all 6513

Add a network interface to an existing virtual machine

$
0
0

Hi!

We are trying to add network interface to an existing VM (Standard A3 (4 cores, 7 GB memory), but we got error:

PS C:\> Update-AzureRmVM -ResourceGroupName "XXXXX" -VM $VirtualMachine
Update-AzureRmVM : VirtualMachineMustHaveOneNetworkInterfaceAsPrimary: Virtual machine XXXX must have one network in
terface set as the primary.

We also try to update "primary" to "true", for first Network interface, but also got an error:

PS C:\> $nic=Get-AzureRmNetworkInterface -Name tds-app229 -ResourceGroupName XXXX
PS C:\> $nic.IpConfigurations[0].primary = "true"
The property 'primary' cannot be found on this object. Verify that the property exists and can be set.
At line:1 char:1
+ $nic.IpConfigurations[0].primary = "true"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyAssignmentException

We did go thrue procedure on:

https://msdn.microsoft.com/en-us/library/mt619351.aspx - example 2

The network interface that we try to add is member of Load Balancer pool.

Regards,

Uros.


UrosL


Viewing all articles
Browse latest Browse all 6513

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>