I've been using Open vSwitches bridges with tagged ports for several years now, and I've been doing the customize config/delete NIC/start install/force stop/edit XML/... dance for every VM I create all this time. Is this still necessary?
I still don't seen anything in the GUI that obviously screams Open vSwitch, but I have a recollection of seeing something posted somewhere not so long ago that gave me hope. (How's that for specific?)
Anyone have a pointer to a better way to do it?
Thanks!
On 09/13/2014 12:55 AM, Ian Pilcher wrote:
I've been using Open vSwitches bridges with tagged ports for several years now, and I've been doing the customize config/delete NIC/start install/force stop/edit XML/... dance for every VM I create all this time. Is this still necessary?
I still don't seen anything in the GUI that obviously screams Open vSwitch, but I have a recollection of seeing something posted somewhere not so long ago that gave me hope. (How's that for specific?)
Anyone have a pointer to a better way to do it?
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
- Cole
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"
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.
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:
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"
In the customization dialog, remove the NIC
Click "Begin Installation"
Complete installation without a NIC or force-off the VM (if a NIC is needed during installation)
Shut down the VM
"virsh edit ..." to add the NIC to the VM
Restart the VM, complete the installation (if needed), configure the NIC, etc.
All in all, it's a pretty ugly process.
Can you dump the NIC XML you use in a bug report against Virtualization Tools -> virt-manager ? I'll follow up there with clarifying questions. I'll try to get this in the the next release
Thanks, Cole
On 09/22/2014 09:03 AM, Cole Robinson wrote:
Can you dump the NIC XML you use in a bug report against Virtualization Tools -> virt-manager ? I'll follow up there with clarifying questions. I'll try to get this in the the next release
I've added a comment to https://bugzilla.redhat.com/show_bug.cgi?id=1059399.
On 09/22/2014 10:19 AM, Ian Pilcher wrote:
On 09/22/2014 09:03 AM, Cole Robinson wrote:
Can you dump the NIC XML you use in a bug report against Virtualization Tools -> virt-manager ? I'll follow up there with clarifying questions. I'll try to get this in the the next release
I've added a comment to https://bugzilla.redhat.com/show_bug.cgi?id=1059399.
Sorry, I scanned the bug list but my eyes missed that :)
On Mon, Sep 22, 2014 at 08:27:18AM -0500, 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:
Right, I've been using Open vSwitch for a while, but with plain `virsh`, some old notes here, indeed, it's a bit of manual process:
http://kashyapc.com/2013/07/13/configuring-libvirt-guests-with-an-open-vswit...
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:
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.
In the customization dialog, remove the NIC
Click "Begin Installation"
Complete installation without a NIC or force-off the VM (if a NIC is needed during installation)
Shut down the VM
"virsh edit ..." to add the NIC to the VM
Restart the VM, complete the installation (if needed), configure the NIC, etc.
All in all, it's a pretty ugly process.
On 09/23/2014 09:48 AM, Laine Stump wrote:
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.
That's what I was hoping for. Thank you, thank you, thank you!
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.
What are the implications (if any) of not having a permanent interface ID?
On 09/25/2014 11:45 AM, Ian Pilcher wrote:
On 09/23/2014 09:48 AM, Laine Stump wrote:
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.
That's what I was hoping for. Thank you, thank you, thank you!
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.
What are the implications (if any) of not having a permanent interface ID?
Truthfully, I'm not sure of the details, but I think the interfaceid may be used by OVS for configuring/tracking packet filtering rules, and for making sure that use statistics and filter rules are properly transferred from one host to another when a guest migrates. That's just a vague recollection combined with some guessing :-)