mercoledì 22 luglio 2020

Change VMNIC name to fit NSX-T Transport Node Profile

Issue
During the design phase of an NSX-T Datacenter implementation, there are a lot of Design Desicions to be addressed and taken, such as the size of the appliances, how many TZ to create, how many Edges (sizing, Active/Active, Active/Standby) .... and so on.

In this design decision I found myself having to consider the following:

  • The customer have many ESXi host clusters to configure with NSX-T where the vmnics that should be used for the creation of the N-VDS are not homogeneous (at the naming convention level). This means, for example, that in a Host-A the vmnic to be used could be named vmnic4 while in a Host-B the vmnic to be associated to the N-VDS could be vmnic9 and so on for other hosts.

  • Second consideration, we are operating in a brown-field environment, where VMs are already up and running.


Well, not having homogeneous vmnic and given the objective need to create a single Transport Node Profile (also applicable to multiple clusters) it was decided to rename the vmnic that will be used/associated with the specific N-VDS in vmnic100 (as showed from the below picture).


As implication for sure we will have to configure each ESXi hosts of the cluster, putting it in maintenance mode (so it to evacuate all running VMs away), rename the vmnic o the vmnics and then restart the system.

Solution
In order to rename/renumbering the vmnics, I found a link to KB article 2091560 that describe how to do this with vSphere 6.x!

So, in our case we want to change the aliases assigned by the ESXi host, for example from vmnic4 to vmnic100, not using Host Profiles but by command line.

Onces gotten the SSH access to the ESXi, from the shell, run the command to see the current assignment of aliases to device locations:

localcli --plugin-dir /usr/lib/vmware/esxcli/int/ deviceInternal alias list
Output


When a nic is controlled by a native driver, then there are actually two aliases associated with the device: a pci alias for the pci device and a logical alias for the uplink logical device.
For each alias that you want to reassign, use the command:

localcli --plugin-dir /usr/lib/vmware/esxcli/int/ deviceInternal alias store --bus-type pci --alias vmnicN --bus-address B

When the logical alias is present, then both the pci alias and logical alias need to be renamed:

localcli --plugin-dir /usr/lib/vmware/esxcli/int/ deviceInternal alias store --bus-type logical --alias vmnicN --bus-address B

where the vmnicN and B are the new assignment that you want to make. For instance, in my case the command is ...

localcli --plugin-dir /usr/lib/vmware/esxcli/int/ deviceInternal alias store --bus-type pci --alias vmnic100 --bus-address s00000002.00


In order the changes take effect it is necessary to perform a clean shut down and reboot the system.

That's it.

Nessun commento:

Posta un commento