I test that Monday, thanks a lot !
> Date: Fri, 21 Sep 2012 16:23:15 +0200 > Subject: Re: [ovs-discuss] Set vnet to VM or alias to vnet > From: [email protected] > To: [email protected] > CC: [email protected]; [email protected] > > > On Thu, Sep 20, 2012 at 08:51:33AM +0200, r po wrote: > >> > >> Hi, > >> > >> I run openvswitch on Ubuntu and KVM. The vnet that i talk is the 'tap' on > >> other distrib. The network interface for the VM. > >> Each VM has one or more network interface, we see there on hypervisor > >> under the name : vnet (tap). Number for vnet is random (i guess .. ) and > >> when i shutdown my VMs and reboot it, number's vnet (tap) is modified : > >> first VM start has vnet0, the 2nd vnet1. if i shutdown and restart the 2nd > >> before the first then the 2nd has vnet0 and the first vnet1. > >> If i look the cacti's graph then i must go on the hypervisor and see which > >> VM attach to which Vnet at precise time > > You can define a custom name for your guest network interface editing > the domain definition xml file. > ($ sudo virsh edit domain_name) > > This with the block > > <target dev='myvnetdefinition'/> > > For example on a fedora17 host (but I think it works also for older > versions of Qemu/KVM and libvirtd) I have a windows 7 vm started and > it automatically gets vnet0. > Then I create another Linux fedora 17 guest (the Qemu/KVM domain is > named "f17") this way: > > <interface type='network'> > <mac address='52:54:00:b0:6c:5f'/> > <source network='default'/> > <target dev='vm_f17_vm'/> > <model type='virtio'/> > <address type='pci' domain='0x0000' bus='0x00' slot='0x03' > function='0x0'/> > </interface> > > Then I start it. Now I get: > > $ sudo brctl show > bridge name bridge id STP enabled interfaces > virbr0 8000.5254006950d5 yes virbr0-nic > vm_f17_vm > vnet0 > > Note that I 'm not using openvswitch here, but it is not relevant for > your need... > > NOTE also that "vnetN" names (such as vnet0, vnet1, ecc.) are reserved > words for libvirt, and if you use them, they are simply ignored and > default naming takes instead place. > This way you can bind vm_<domain_name>_vm to specific interfaces. > Or also generalize further, in case you can have more than one > interface on each guest. > > eg > vm_f17_nic0_vm > vm_f17_nic1_vm > ecc > > See more at > http://libvirt.org/formatdomain.html#elementsNICSTargetOverride > > HIH, > Gianluca
_______________________________________________ discuss mailing list [email protected] http://openvswitch.org/mailman/listinfo/discuss
