Sorting Virtual Network Interface Names With Xen

Home » CentOS-Virt » Sorting Virtual Network Interface Names With Xen
CentOS-Virt No Comments

Hi,

how would I make it so that a particular virtual network interface of dom0 is attached to a particular bridge created for a particular VM?

When I start the VM with ‘virsh start ‘, I get interfaces vif1.0, vif1.1 and vif1.2. After shutting down domU with ‘virsh shutdown
‘ and starting it again as before, the virtual network interfaces are vif2.0, vif2.1 and vif2.2.

I want them to keep their names so that they would be vif1.[0-2] again.

In the end, I want to give them different names, like vif_domU.loc, vif_domU.dmz and vif_domU.mta, which they are supposed to keep consistently.

Is it possible to hardcode the interface names in the domain description? Currently, the default script /etc/xen/scripts/vif-bridge is used to create them.

And once hardcoded, how do I make it so that the corresponding interfaces in domU have appropriate names like eth_loc, eth_dmz and eth_mta?

Generic interface names for all the bridges and interfaces would lead to total confusion in this case because I`d never be able to tell which bridge or interface in dom0 corresponds to what in any of the domUs.