Bug 1059399 - RFE: Support Open vSwitch Network Adapters in virt-manager UI
Summary: RFE: Support Open vSwitch Network Adapters in virt-manager UI
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: virt-manager
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Cole Robinson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-29 18:52 UTC by Solly Ross
Modified: 2017-03-29 17:39 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-29 17:39:09 UTC
Embargoed:


Attachments (Terms of Use)

Description Solly Ross 2014-01-29 18:52:47 UTC
Description of problem:
Currently, there does not appear to be a way in the UI to directly that a NIC should use a bridge-type interface with an Open vSwitch virtualport.

The "specify shared device name" option under the NIC's details page should have an option to specify a virtualport type, so that virt-manager can produce the following XML (instead of having to insert by hand):

    <interface type='bridge'>
      <mac address='aa:bb:cc:dd:ee:ff'/>
      <source bridge='some-openvswitch-network'/>
      <virtualport type='openvswitch'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </interface>

Comment 1 Ian Pilcher 2014-09-22 14:17:52 UTC
+1 to this, except that I also need to specify the VLAN tag(s).  For example,

    <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>

Given the level of flexibility that Open vSwitch provides, I tend to think that this is where the libvirt networks/portgroups abstraction (which I've not previously used) can come in handy.  I.e., just make sure that virt-manager can handle the types of network XML shown here:

  http://libvirt.org/formatnetwork.html#elementVlanTag
  http://libvirt.org/formatnetwork.html#elementsPortgroup

(Providing a nice GUI for creating the network XML can be left as an exercise for later.)

Comment 2 Cole Robinson 2014-09-22 14:21:05 UTC
Also kashyap's notes here:

http://kashyapc.com/2013/07/13/configuring-libvirt-guests-with-an-open-vswitch-bridge/

virt-manager does support selecting portgroups, if the virtual network has portgroups in its XML. But no UI for creating portgroups yet

Comment 3 Cole Robinson 2014-09-24 15:53:40 UTC
Some more bits from laine here:

https://lists.fedoraproject.org/pipermail/virt/2014-September/004174.html

Comment 4 Ian Pilcher 2014-09-25 16:09:14 UTC
(In reply to Cole Robinson from comment #3)
> Some more bits from laine here:
> 
> https://lists.fedoraproject.org/pipermail/virt/2014-September/004174.html

I can confirm that this works.  From my POV, this pretty much addresses the issue.

It would certainly be *nice* to have a GUI for creating Open vSwitch-bridged networks, but defining the libvirt network "manually" one time isn't nearly the burden that having to manually edit the domain XML for every guest is.

Comment 5 Cole Robinson 2017-03-29 17:39:09 UTC
Upstream virt-manager was extended to handle openvswitch <network> explicitly, and set virtualport type='openvswitch' in the VM XML to match. So create a virtual network like

<network>
  <name>ovsbr1</name>
  <forward mode='bridge'/>
  <bridge name='ovsbr1'/>
  <virtualport type='openvswitch'/>
  ...
</network>


Then when you select that as a network source in virt-manager, you'll get the option to tweak virtualport values, and select portgroups if any were defined. I think that mostly covers things here


Note You need to log in before you can comment on or make changes to this bug.