XenServer - join host with different number of interfaces to existing pool

If your host has different number of interfaces then hosts in existing pool you need to make sure the names of interfaces are in order with those in pool. It means that if you use 8 NICs in pool and new host has 10 NICs you need to user first 8 NICs on that pool.

So if somehow you ended up with connecting eth2-eth9 for whatever reason on new host you need to rename them to become eth0-eth7. Especially if you use bonded interfaces in pool your NIC names have to be consistent. More detail on renaming interface on xenserver you can find on citrix page: https://support.citrix.com/article/CTX135809.

To rename interface you can use interface-rename command on host. So login on your new host localy using server console or remote console if applicable in your case.

Run command to see all your NICs:


interface-rename --list
Name  MAC                PCI           ethN  Phys  SMBios                Driver  Version   Firmware                
eth0  90:1b:0e:eb:3e:d9  0000:01:00.0  eth0  em1   Intel i350            igb     5.3.5.3   1.63, 0x80000ec5        
eth1  90:1b:0e:eb:3e:da  0000:01:00.1  eth1  em2   Intel i350            igb     5.3.5.3   1.63, 0x80000ec5        
eth2  4c:52:62:01:72:57  0000:3d:00.0  eth2  em3   Flexible LOM Adapter  i40e    1.3.46-k  3.33 0x800010ef 1.1876.0
eth3  4c:52:62:01:72:58  0000:3d:00.1  eth3  em4   Flexible LOM Adapter  i40e    1.3.46-k  3.33 0x800010ef 1.1876.0
eth4  4c:52:62:01:72:59  0000:3d:00.2  eth4  em5   Flexible LOM Adapter  i40e    1.3.46-k  3.33 0x800010ef 1.1876.0
eth5  4c:52:62:01:72:5a  0000:3d:00.3  eth5  em6   Flexible LOM Adapter  i40e    1.3.46-k  3.33 0x800010ef 1.1876.0
eth6  b4:96:91:03:f6:74  0000:d8:00.0  eth6  p7p1  SLOT 07               igb     5.3.5.3   1.63, 0x80000ee4        
eth7  b4:96:91:03:f6:75  0000:d8:00.1  eth7  p7p2  SLOT 07               igb     5.3.5.3   1.63, 0x80000ee4        
eth8  b4:96:91:03:f6:76  0000:d8:00.2  eth8  p7p3  SLOT 07               igb     5.3.5.3   1.63, 0x80000ee4        
eth9  b4:96:91:03:f6:77  0000:d8:00.3  eth9  p7p4  SLOT 07               igb     5.3.5.3   1.63, 0x80000ee4 

According to this list you need to make eth2 into eth0, eth3 into eth1 etc. To make that use command interface-rename --update <target eth name>=MAC|PCI|Phys|SMBios. I will use 'Phys' names cause it's shorter to write. Result will be:


interface-rename --update eth0=em3 eth1=em4 eth2=em5 eth3=em6 eth4=p7p1 eth5=p7p2 eth6=p7p3 eth7=p7p4 eth8=em1 eth9=em2
INFO     [2018-09-05 11:14:47] Performing manual update of rules.  Not actually renaming interfaces
INFO     [2018-09-05 11:14:47] All done 

Now you need to reboot server for changes to take effect. When server is up again check NIC order:


interface-rename --list
Name  MAC                PCI           ethN  Phys  SMBios                Driver  Version   Firmware                
eth0  4c:52:62:01:72:57  0000:3d:00.0  eth2  em3   Flexible LOM Adapter  i40e    1.3.46-k  3.33 0x800010ef 1.1876.0
eth1  4c:52:62:01:72:58  0000:3d:00.1  eth3  em4   Flexible LOM Adapter  i40e    1.3.46-k  3.33 0x800010ef 1.1876.0
eth2  4c:52:62:01:72:59  0000:3d:00.2  eth4  em5   Flexible LOM Adapter  i40e    1.3.46-k  3.33 0x800010ef 1.1876.0
eth3  4c:52:62:01:72:5a  0000:3d:00.3  eth5  em6   Flexible LOM Adapter  i40e    1.3.46-k  3.33 0x800010ef 1.1876.0
eth4  b4:96:91:03:f6:74  0000:d8:00.0  eth6  p7p1  SLOT 07               igb     5.3.5.3   1.63, 0x80000ee4        
eth5  b4:96:91:03:f6:75  0000:d8:00.1  eth7  p7p2  SLOT 07               igb     5.3.5.3   1.63, 0x80000ee4        
eth6  b4:96:91:03:f6:76  0000:d8:00.2  eth8  p7p3  SLOT 07               igb     5.3.5.3   1.63, 0x80000ee4        
eth7  b4:96:91:03:f6:77  0000:d8:00.3  eth9  p7p4  SLOT 07               igb     5.3.5.3   1.63, 0x80000ee4        
eth8  90:1b:0e:eb:3e:d9  0000:01:00.0  eth0  em1   Intel i350            igb     5.3.5.3   1.63, 0x80000ec5        
eth9  90:1b:0e:eb:3e:da  0000:01:00.1  eth1  em2   Intel i350            igb     5.3.5.3   1.63, 0x80000ec5

Now just configure management interface on new NIC and reboot server. If you already configured management interface you will need to do it again cause it will stay on same interface as before.

In my case I configured management on interface eth0 before changing order though active link was on eth2. Then after changing NIC order and rebooting server it was reachable over eth0 interface.

Be careful not to use xe-reset-networking cause it will revert names back.