Quantcast
Channel: Azure Virtual Machines forum
Viewing all articles
Browse latest Browse all 12545

Adding multiple NICs to Azure VM

$
0
0

Hi,

I want to create a VM with multiple NICs but it is not quite working as expected
I followed the simple steps as described here
http://azure.microsoft.com/blog/2014/10/30/multiple-vm-nics-and-network-virtual-appliances-in-azure/
or here
http://msdn.microsoft.com/en-us/library/azure/dn848315.aspx

but none of them seems to work. I keep getting the following error:

New-AzureVM : BadRequest : Secondary Network Interface usage not allowed for this deployment.
At line:14 char:1
+ New-AzureVM -ServiceName "gbmyssasX" –VNetName $vmNetName –VM $vm -AffinityGroup ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [New-AzureVM], CloudException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.IaaS.PersistentVMs.NewAzureVMCommand

this is the PowerShell Code that im Using:

$affGroupName = "MyAG"
$vmNetName = "My_VNET"
$vmSubNetName = "MySubnet1"

$image = Get-AzureVMImage -ImageName "a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201412.01-en.us-127GB.vhd"
$vm = New-AzureVMConfig -Name "gbmyvmX" -InstanceSize "ExtraLarge" -Image $image.ImageName
Add-AzureProvisioningConfig –VM $vm -Windows -AdminUserName “localadmin” -Password "PM`$`$one01"
Add-AzureNetworkInterfaceConfig -Name "Ethernet123" -SubnetName $vmSubNetName -VM $vm
#Add-AzureNetworkInterfaceConfig -Name "Ethernet2" -SubnetName $vmSubNetName -VM $vm
Set-AzureSubnet -SubnetNames $vmSubNetName -VM $vm
Set-AzureStaticVNetIP -IPAddress "172.16.0.150" -VM $vm

New-AzureVM -ServiceName "gbmyvmX" –VNetName $vmNetName –VM $vm -AffinityGroup $affGroupName

I am using a ExtraLarg-VM which should support up to 4 NICs
Also, the script runs just fine if i remove the Add-AzureNetworkInterfaceConfig 

I thought the issue may be that I add two NICs to the same SubNet but this should work in theory according to the links above saying "Multiple NICs on the same virtual network subnet is supported."

any help is highly appreciated!

-gerhard


Gerhard Brueckl
blogging @ http://blog.gbrueckl.at
working @ http://www.pmOne.com


Viewing all articles
Browse latest Browse all 12545

Trending Articles



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