NIC mapping issues after upgrade to 1.4

bradl

New Member
Sep 10, 2009
4
0
1
Hi, First of all I would like to thank you for your awesome product!

I currently utilise your product on 3 servers in a cluster. Each server has 4 NICs and has been steadily upgraded since version 1.1.

After the upgrade to 1.4 it seems the NIC mappings for the 3rd and 4th interfaces have been swapped. I have tried a fresh install from the cd and it also behaves the same way.

From the screen shot below you can see that the order of the NICs is not sequential. It previously was. The consequence of which is that every virtual machine needs to have its network configuration changed at the OS level.

nics.png


I have tried deleting and recreating the NICs via the hardware configuration page for the individual virtual machines, have tried modifying the vlan to MAC address line in /etc/qemu-server/<VMID>.conf, and have tried modifying the udev rules for the physical NICs on the host server. The order of the NICs for the virtual machines still remains out of order.

Can you suggest where else I could try to change this behaviour? Short of reconfiguring every virtual machine itself I don't know what to do.

Thanks,
Brad.
 
Can you suggest where else I could try to change this behaviour? Short of reconfiguring every virtual machine itself I don't know what to do.

You can't specify the order on the host. Instead that need to be done inside the VM. For example on Debian based VMs, the order is specified in /etc/udev/rules.d/70-persistent-net.rules

What OS do you run inside the VM?

And I am quite sure that this does not relate in any way to version 1.4.

- Dietmar
 
Thanks for the quick reply.

I run a wide range of operating systems including Windows XP, 2003, freeBSD, CentOS, Debian, and Ubuntu. The particular machine I am having difficulty with is an installation of pfSense. I have halted the migration of any further machines until I could figure out what was going on.

The behaviour does not make any sense to me, and as you mentioned the obvious solution is to modify the udev or equivalent rules in each of the VMs.

What I don't understand is why after the update when I look at the hardware/network page of the particular VM that the order of the ethernet devices has changed (as pictured previously). Essentially in the pfSense case its NIC mapping is now vmbr0 -> em0, vmbr1 -> em1, vmbr2 -> em3, vmbr3 -> em2 instead of vmbr0 -> em0, vmbr1 -> em1, vmbr2 -> em2, vmbr3 -> em3. Yes I can change the config in the VM, but I didn't really want to have to do that for 50+ machines.

It seems if I could change the NIC order (in the previous picture) back to 0,1,2,3 instead of 0,1,3,2 then the devices would be presented in the correct order to the VM. Basically I don't know what governs the order of the ethernet devices as pictured. I'm guessing it is a gap in my understanding.

Sorry for the hassle!
Thanks, Brad.
 
The behaviour does not make any sense to me, and as you mentioned the obvious solution is to modify the udev or equivalent rules in each of the VMs.

No, any reasonable OS saves the order (thats the whole point of those udev rules).

You need to find out why pfsense does not do that?
 
Its not specific to that OS though. The change of ethernet order occurs somewhere in the config of the VM or above. It seems the order of virtual hardware is being presented differently to the VM OS. Perhaps pfSense should be smart enough to rearrange the order dynamically, but it seems it isn't.
I know I can fix it by modifying the udev rules inside the VM or by reassinging the NICs, but it would be far easier if possible to modify the order of the ethernet devices at the host level.

Which piece of config on the host machine determines the order of the NICs? (as pictured before). The change in order has occurred before any VM OS has booted.

My only other solution at this stage (besides reconfiguring the OS of every VM) is to reinstall version 1.3 which worked as expected. I was rather hoping to utilise the new storage options of 1.4 though.

Thanks for you time.
 
There is no defined order for NICS - that is why all OS remembers the mac and orders them internaly (with udev or something similar).
 
From what I see pfsense saves the mac->interface mapping too - did you ask on there forum why such reorder happens?