none
Add secondary NIC Card to existing VM RRS feed

  • Question

  • Hi,

    I created some of VMs in Azure and four VMs need to have secondary NIC card, How can I add secondary NIC card to existing VM. I found some post that it cannot add NIC card to existing VM and need to add during VM creation, is it true ?

    How many NIC card supported per VM ?

    thanks

    Keith

    Friday, February 6, 2015 1:51 AM

Answers

  • Hi,

    Multi-NIC VMs must be in created in Azure virtual networks. Non-VNet VMs are not supported.

    The current release does NOT support adding or removing NICs after a VM is created. Multi-NIC can only be applied when a VM is created.

    The vmNICs must be added at the time of virtual machine creation. If you have an existing virtual machine that you want to add vmNICs to, you'll need to delete the virtual machine while keeping the VHDs and then create a new virtual machine using the existing VHD while adding the new vmNICs as part of the provisioning.

    The table below lists the numbers of NICs corresponding to the size of the VMs:
    VM Size (Standard SKUs) NICs (max allowed per VM)
    A3, A6, D3, A8, G3, D12 (4-core, except G3, A8) 2
    A4, A7, A9, G4, D4, D13 (8-core, except G4, A9) 4
    All other sizes at this time 1

    In order to Configure Multi-NIC VM, refer to the below mentioned steps:

    • Select a VM image from Azure VM image gallery:

    $image = Get-AzureVMImage -ImageName "a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201408.01-en.us-127GB.vhd"

    • Create a VM configuration.

    $vm = New-AzureVMConfig -Name "MultiNicVM" -InstanceSize "ExtraLarge" -Image $image.ImageName –AvailabilitySetName “MyAVSet”

    • Create the default administrator login.

    Add-AzureProvisioningConfig –VM $vm -Windows -AdminUserName “<YourAdminUID>” -Password “<YourAdminPassword>”

    • Add additional NICs to the VM configuration. There are several things to note about this:

    >> The configuration of the “default” NIC is not set through this cmdlet. Please refer to Step 5.

    >>The SubnetName must match one of the subnets in the intended virtual network.

    >>The Name parameter must be unique within the same VM, but does not represent the names of the NICs                     inside the VM.

    Add-AzureNetworkInterfaceConfig -Name "Ethernet1" -SubnetName "Midtier"
    -StaticVNetIPAddress "10.1.1.111" -VM $vm

    Add-AzureNetworkInterfaceConfig -Name "Ethernet2" -SubnetName "Backend" 
    -StaticVNetIPAddress "10.1.2.222" -VM $vm

    • Specify the subnet and IP address for the default NIC.

    Set-AzureSubnet -SubnetNames "Frontend" -VM $vm
    Set-AzureStaticVNetIP -IPAddress "10.1.0.100" -VM $vm

    • Create the VM your virtual network. Note: The VNet that you specify here must already exist (as mentioned in the prerequisites). The example below specifies a virtual network named “MultiNIC-VNet”.

    New-AzureVM -ServiceName "MultiNIC-CS" –VNetName “MultiNIC-VNet” –VM $vm

    Hope this helps !

    Regards,

    Sowmya


    Friday, February 6, 2015 11:11 AM
    Moderator

All replies

  • Hi,

    Multi-NIC VMs must be in created in Azure virtual networks. Non-VNet VMs are not supported.

    The current release does NOT support adding or removing NICs after a VM is created. Multi-NIC can only be applied when a VM is created.

    The vmNICs must be added at the time of virtual machine creation. If you have an existing virtual machine that you want to add vmNICs to, you'll need to delete the virtual machine while keeping the VHDs and then create a new virtual machine using the existing VHD while adding the new vmNICs as part of the provisioning.

    The table below lists the numbers of NICs corresponding to the size of the VMs:
    VM Size (Standard SKUs) NICs (max allowed per VM)
    A3, A6, D3, A8, G3, D12 (4-core, except G3, A8) 2
    A4, A7, A9, G4, D4, D13 (8-core, except G4, A9) 4
    All other sizes at this time 1

    In order to Configure Multi-NIC VM, refer to the below mentioned steps:

    • Select a VM image from Azure VM image gallery:

    $image = Get-AzureVMImage -ImageName "a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201408.01-en.us-127GB.vhd"

    • Create a VM configuration.

    $vm = New-AzureVMConfig -Name "MultiNicVM" -InstanceSize "ExtraLarge" -Image $image.ImageName –AvailabilitySetName “MyAVSet”

    • Create the default administrator login.

    Add-AzureProvisioningConfig –VM $vm -Windows -AdminUserName “<YourAdminUID>” -Password “<YourAdminPassword>”

    • Add additional NICs to the VM configuration. There are several things to note about this:

    >> The configuration of the “default” NIC is not set through this cmdlet. Please refer to Step 5.

    >>The SubnetName must match one of the subnets in the intended virtual network.

    >>The Name parameter must be unique within the same VM, but does not represent the names of the NICs                     inside the VM.

    Add-AzureNetworkInterfaceConfig -Name "Ethernet1" -SubnetName "Midtier"
    -StaticVNetIPAddress "10.1.1.111" -VM $vm

    Add-AzureNetworkInterfaceConfig -Name "Ethernet2" -SubnetName "Backend" 
    -StaticVNetIPAddress "10.1.2.222" -VM $vm

    • Specify the subnet and IP address for the default NIC.

    Set-AzureSubnet -SubnetNames "Frontend" -VM $vm
    Set-AzureStaticVNetIP -IPAddress "10.1.0.100" -VM $vm

    • Create the VM your virtual network. Note: The VNet that you specify here must already exist (as mentioned in the prerequisites). The example below specifies a virtual network named “MultiNIC-VNet”.

    New-AzureVM -ServiceName "MultiNIC-CS" –VNetName “MultiNIC-VNet” –VM $vm

    Hope this helps !

    Regards,

    Sowmya


    Friday, February 6, 2015 11:11 AM
    Moderator
  • Hi,

    I wrote a script to add a network card to a existing VM, see http://contoso.se/blog/?p=4110


    Anders Bengtsson | Microsoft PFE | blog at http://www.contoso.se

    Friday, February 6, 2015 6:20 PM
  • Hi,

    I wrote a script to add a network card to a existing VM, see http://contoso.se/blog/?p=4110


    Anders Bengtsson | Microsoft PFE | blog at http://www.contoso.se

    Anders

    I tried several times to ran your script, but always got error on the last par to create the new VM. Can we talk by email?


    Jose Chavez IT Manager

    Thursday, May 28, 2015 6:34 AM