Hi! I'm aware that (host side) vnetX are created when VM boots. But I'm trying to figure out a way ti create a persistence in vnetX names. What I mean is, say, I want to associate VMs vm0 to vnet0, vm1 to vnet1, vm2 to vnet2 and so forth, no matter which order the VMs are booted. I looked around network XML format, but did't find something... Since I'm using Open vSwitch as bridge, and it is controlled by my OpenFlow application, I can query for OF ports numbers based on port names (interfaces names). OVSDB can be used for such query, but the controller I'm using, Pox, has a limited support to it (stills in development). I'm using libvirt 1.0.5 and Qemu/KVM 1.4.2 on a Fedora 19 host. Thanks a lot in advance. -- Att Lucas Brasilino MSc Student @ Federal University of Pernambuco (UFPE) / Brazil twitter: @lucas_brasilino
Daniel P. Berrange
2015-May-08 15:37 UTC
Re: [libvirt-users] vnetX interface name persistence
On Fri, May 08, 2015 at 12:31:34PM -0300, Lucas Brasilino wrote:> Hi! > > I'm aware that (host side) vnetX are created when VM boots. But I'm trying to > figure out a way ti create a persistence in vnetX names. What I mean is, > say, I want to associate VMs vm0 to vnet0, vm1 to vnet1, vm2 to vnet2 and > so forth, no matter which order the VMs are booted. I looked around network > XML format, but did't find something...The <target dev="xxxx"/> element inside the <interface> controls the name. You just have to use a prefix that is /not/ 'vnet' - if libvirt sees 'vnetXXX' it'll throw it away & auto-generate a name Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|