On 09/22/2014 09:27 AM, Ian Pilcher wrote: > On 09/15/2014 09:21 AM, Cole Robinson wrote: >> There's no explicit openvswitch support in virt-manager or virt-install. That >> said I'm not too familiar with the openvswitch support in libvirt: if there's >> a way to use openvswitch using XML config options that predate openvswitch >> than you can probably make it work with virt-manager > Open vSwitch has worked with libvirt for a long time: > > <interface type='bridge'> > <mac address='52:54:00:91:b0:3f'/> > <source bridge='ovs0'/> > <vlan> > <tag id='250'/> > </vlan> > <virtualport type='openvswitch'> > <parameters interfaceid='25f2a25d-cfed-58f8-be38-2a3d3f057233'/> > </virtualport> > <model type='virtio'/> > <address type='pci' domain='0x0000' bus='0x00' slot='0x03' > function='0x0'/> > </interface> > > And VMs attached to Open vSwitch ports work just fine in virt-manager. > The challenge is creating such VMs. The process I use is: > > 1) Create new VM in virt-manager ... > > - Select "Customize configuration before install" > > - In "Advanced options," change the network type to "Specify shared > device name," and set the "Bridge name" to ovs0 > > - Click "Finish"
Instead of this, create a libvirt network that points to the ovs bridge, something like this: <network> <name>ovs-net</name> <forward mode='bridge'/> <bridge name='ovs0'/> <virtualport type='openvswitch'/> </network> net-start and net-autostart that network, then whenever you create new guests, point their network device at this network. The one caveat of this is that no permanent interfaceid will be generated for each interface, so each time a guest is started, it will get a new OVS interfaceid. To solve this, just add: <virtualport type='openvswitch'/> to the guest's <interface> at some later time (this can be after the installation is already finished) using virsh edit - a permanent interfaceid will be automatically generated and used from then on. > > 2) In the customization dialog, remove the NIC > > 3) Click "Begin Installation" > > 4) Complete installation without a NIC or force-off the VM (if a NIC is > needed during installation) > > 5) Shut down the VM > > 6) "virsh edit ..." to add the NIC to the VM > > 7) Restart the VM, complete the installation (if needed), configure the > NIC, etc. > > All in all, it's a pretty ugly process. > _______________________________________________ virt mailing list virt@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/virt