HP Virtual Connect NICs and Windows Server 2012

My first blog post! In this post I wanted to share a script that will be very helpful for me going forward working with HP Virtual Connect Flex 10 and HP BL460c that run a Microsoft OS. In the past we have always spent a lot of time figuring out what NIC maps back to the network we configured in virtual connect.

 

You can configure 8 NICs/networks with Virtual Connect Flex 10

clip_image002[6]

(Image is of an old ESX Profile in virtual connect)

Using the above Virtual connect Profile we now need to rename our NICs in windows. You need to ether install Powershell v3 or run this on Server 2012.

 

Set-ExecutionPolicy -ExecutionPolicy Unrestricted

#Get all of the Physical NICs Hardware Info

# the function value ties back to the order of the port number in Virtual Connect

$NICS = Get-NetAdapterHardwareInfo

foreach($nic in $NICS)

{

#Get the function number for each nic as we loop through them

$NicID = $nic.Function

Switch ($NicID)

  {

  #Name Each NIC so you can easily identify what network each is plugged into.

 

                           0{ Rename-NetAdapter -Name $nic.Name HyperV_Mgmt_Bay_1 }

                            1{ Rename-NetAdapter -Name $nic.Name HyperV_Mgmt_Bay_2 }

                            2{ Rename-NetAdapter -Name $nic.Name VM_Networks_Bay_1 }

                            3{ Rename-NetAdapter -Name $nic.Name VM_Networks_Bay_2 }

                            4{ Rename-NetAdapter -Name $nic.Name Live_Migration_Bay_1 }

                            5{ Rename-NetAdapter -Name $nic.Name Live_Migration_Bay_2 }

                            6{ Rename-NetAdapter -Name $nic.Name iSCSI_Bay_1 }

                             7{ Rename-NetAdapter -Name $nic.Name iSCSI_Bay_2 }

          }

}

 

You can now team your NICs, I encourage you to do this also with powershell script  That will most likely be my next Blog post.

Advertisements
This entry was posted in HP, Server 2012. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s