john fisher
2012-Dec-06 19:42 UTC
[libvirt-users] Ordering multiple network interfaces on vms
On a hypervisor with multiple interfaces, we'd like to make those interfaces available to each of multiple VMs. We have both bridged interfaces and SRIOV interfaces, no NAT interfaces. When we create a vm in virsh using an xml file with no network elements, but having interface elements, we get the interfaces in the vm, but the ordering of eth devices does not match the ordering on the hypervisor and we aren't sure the ordering is repeatable either. In other words, eth0 in the HV is thingA and eth1 is thingB, but on the VM eth0 is thingC eth1 is thingD and eth4 is thingA so forth. we have 12 interfaces so ordering or naming is important and confusing. We've tried to use the PCI bus numbers as seen in lspci on the HV, but no luck. Do we need to start using network elements in the vm's xml file or separately to control the ordering? Whats the usual practice here? Sample xml: <interface type='hostdev'> <source dev='eth3' mode='vepa'> <address type='pci' domain='0x0000' bus='0x16' slot='0x10' function='0x1'/> </source> <target dev='macvtap0'/> </interface> <interface type='bridge'> <source bridge='br4'/> <target dev='vnet0'/> <model type='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> Thanks! -- John Fisher
Gao Yongwei
2012-Dec-08 16:21 UTC
[libvirt-users] Ordering multiple network interfaces on vms
2012/12/7 john fisher <john at jpfisher.net>> <target dev='vnet0'/>I think the vnet* can affect the order in vm. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20121209/98da06e1/attachment.htm>