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
> 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:
<address type='pci' domain='0x0000' bus='0x00'
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:
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:
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
All in all, it's a pretty ugly process.