Is there a way to assign a VMHost's physical NIC to a particular VD Uplink Port?
My Virtual Distributed Switch has 4 uplinks per host. My blade has 4 physical NICs, two are 10 gig and two are 1 gig. I want to script a way so the 1st 10 gig NIC (the one with the lowest MAC) gets assigned to dvUplink1 the other 10 gig NIC is assigned to dvUplink2. The 1st 1 gig NIC gets assigned to dvUplink3 and the 2nd 1 gig NIC get assigned to dvUplink4. I know how to get a reference the appropriate physical NIC in the host, I just can't figure out how to assign it to a particular dvUplink on the DVS.
Any suggestions?
Thanks,
Isn't this done in the order you specify them on the VMHostPhysicalNic parameter ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
With
Get-VMHostNetworkAdapter -Physical -VMHost $esx
you can get the MAC and the DeviceName.
And you can use this DeviceName on the Add-VDSwitchPhysicalNetworkAdapter cmdlet on the VMHostPhysicalNic parameter.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Yes, like I said, I know how to get a reference to a particular the Physical NIC. I just don't know, and what I'm asking is, how do I assign that physical NIC to a particular DVuplink port.
So how would you script: on vmHostA assign vmnic0 to dvUplink3 on dvSwitch0?
Isn't this done in the order you specify them on the VMHostPhysicalNic parameter ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Ah, so you're suggesting I pass an array of physical NICs. Where element 0 would get assigned to DVuplink1, element 1 would get assign to DVuplink2, etc... Intriguing.
I'll give it a try. Thanks!
How can uplinks be left blank or the physical NICs be entered in different order?
For example, assume Uplink 1, Uplink 2, Uplink 3, and Uplink 4. How can I do the following assignment?
Uplink 1 => vmnic0
Uplink 2 => <null>
Uplink 3 => vmnic2
Uplink 4 => vmnic1
Thanks for the help.
Isn't this done in the order you specify them on the VMHostPhysicalNic parameter ?
No it isn't. Not always for some reason. On one of my hosts it starts on dvUplink5 out of 6. The same thing happens if I use the vsphere web client and choose auto-assign.
On my other host it starts with dvUplink1 though.
I would also like to know how to get a predictable result with Add-VDSwitchPhysicalNetworkAdapter.