RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 643947 - RFE: Support a logical network switch abstraction
Summary: RFE: Support a logical network switch abstraction
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.1
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Laine Stump
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 632760
Blocks: 655920 693512 703851
TreeView+ depends on / blocked
 
Reported: 2010-10-18 15:42 UTC by Daniel Berrangé
Modified: 2011-12-06 10:52 UTC (History)
19 users (show)

Fixed In Version: libvirt-0.9.4-rc1-1.el6
Doc Type: Enhancement
Doc Text:
When bridged and direct connections are used, the network interface definition of guests managed by libvirt can have host-specific information embedded in the guest config; for example in direct mode, the name of the physical device being used, or in bridge mode the name of the bridge device. In order to make migrations between non-identical hosts possible, this RFE provides a method of removing the host-specific items in the guest's network interface config, placing it in a libvirt virtual network definition instead. The guest can then simply reference the network to use by name, avoiding the necessity to put host-specific info in the guest config. At run-time libvirt will look up the guest definition for the current host, and use that information (which may be different for each host) to setup the guest's network connectivity. Note that, in addition to making migration possible, this RFE allows setting up "pools" of physical interfaces for use in direct mode - rather than the config for each guest needing to specify a particular device (which must then be reserved for that guest even when it's not running), the guest just references a network - libvirt will then locate an unused (or the least used, depending on which is appropriate) interface, and use that interface instead.
Clone Of: 636106
Environment:
Last Closed: 2011-12-06 10:52:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1513 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-12-06 01:23:30 UTC

Description Daniel Berrangé 2010-10-18 15:42:32 UTC
+++ This bug was initially created as a clone of Bug #636106 +++

Description of problem:
The physical network interface configuration may be different on each host machine, even though each host is using the same logical network. There needs to be a 'virtual switch' abstraction modelled in libvirt. This will let VMs be configured identically on every host, even if the physical connectivity is different.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 4 Laine Stump 2011-04-12 16:18:40 UTC
I just posted a proposal for implementing this functionality upstream.

https://www.redhat.com/archives/libvir-list/2011-April/msg00591.html

Comment 5 Martin Wilck 2011-04-13 10:45:59 UTC
I notice that this RFE doesn't mention openvswitch at all. Wouldn't that offer all you need, and even more, if there was a plugin for configuring openvswitch in libvirt?

Comment 6 Laine Stump 2011-04-13 14:25:28 UTC
(In reply to comment #5)
> I notice that this RFE doesn't mention openvswitch at all. Wouldn't that offer
> all you need, and even more, if there was a plugin for configuring openvswitch
> in libvirt?

In order to keep the discussion in one place (and to make sure there is full participation, since not everyone on the list is following this bug), I've replied to this question in the mailing list thread given in Comment 4. Please post followups to the mailing list thread.

(the summary is that openvswitch cannot be considered an alternative to the proposed code, but that code will likely make it easier to add support for openvswitch to libvirt)

Comment 8 Laine Stump 2011-04-29 20:16:28 UTC
I just posted a reply to Oved's latest mail on this topic where I propose what the new host network and guest interface XMLM will look like. Please take a look and see if it fits all the requirements:

https://www.redhat.com/archives/libvir-list/2011-April/msg01269.html

Comment 12 Laine Stump 2011-06-13 00:40:02 UTC
Here is the latest proposal for how this will work:

 https://www.redhat.com/archives/libvir-list/2011-June/msg00471.html

Please comment appropriately in followup messages on the mailing list.

Comment 14 Laine Stump 2011-07-05 07:49:34 UTC
A series of patches providing this functionality has been posted upstream:

 https://www.redhat.com/archives/libvir-list/2011-July/msg00149.html

It is functionally complete, and has gone through rudimentary testing.

Comment 15 Laine Stump 2011-07-21 18:58:56 UTC
A series of patches to support this has been pushed upstream, and will be in the next libvirt upstream release:

commit 6fe5fde2922405176fbe9315971ab818193af0e0
Author: Laine Stump <laine>
Date:   Tue Jul 19 22:08:15 2011 -0400

    util: define MAX
    
commit a3d95b550bf6a1fa032d7cc70352c88685670bac
Author: Laine Stump <laine>
Date:   Wed Jun 29 00:38:10 2011 -0400

    conf: put virtPortProfile struct / functions in a common location
    
commit 524655eea2500196a98af20be3edfa198f870e85
Author: Laine Stump <laine>
Date:   Mon Jul 18 18:44:38 2011 -0400

    conf: virDomainNetDef points to (rather than contains) virtPortProfile
    
commit 07f4136993c3cce619ff92f4687171a335f6bf51
Author: Laine Stump <laine>
Date:   Sun Jun 26 04:09:00 2011 -0400

    conf: support abstracted interface info in domain interface XML
    
commit 40fd7073befbd6e8ed2b6935898079bb2ff874dd
Author: Laine Stump <laine>
Date:   Tue Jul 19 23:01:09 2011 -0400

    conf: support abstracted interface info in network XML

commit b48e81bf945314d491b0919144dee8565d3d446f
Author: Laine Stump <laine>
Date:   Thu Jun 30 17:05:07 2011 -0400

    network: separate Start/Shutdown functions for new network types
    

commit 03caa988a6a1497a012205796f78b2005edc09cf
Author: Laine Stump <laine>
Date:   Sun Jul 3 21:57:45 2011 -0400

    qemu: use virDomainNetGetActual*() functions where appropriate
    
commit e9949a586a9a2e6642d6394f85bd58955740b69d
Author: Laine Stump <laine>
Date:   Wed Jul 20 00:06:45 2011 -0400

    qemu: use virDomainNetGetActual*() in qemuDomainXMLToNative
    
commit 04711a0f32ac2e9c44081911295b436b2c0a11cf
Author: Laine Stump <laine>
Date:   Mon Jul 4 02:27:12 2011 -0400

    network: internal API functions to manage assignment of physdev to guest

Comment 18 Laine Stump 2011-08-04 07:16:47 UTC
This error sounds like you don't have a vepa-capable switch connected to the ethernet. If you don't, then this error is expected, and you can't test vepa mode. If that's the case, then you can mark this bug verified because you've tested everything you are able to test, and all of the tests passed.

If you *do* have a vepa-capable switch, first see if you can successfully start a domain using this <interface> definition instead:

    <interface type='direct'>
      <mac address='52:54:00:1b:6f:e5'/>
      <source dev='eth0' mode='vepa'/>
      <virtualport type='802.1Qbg'>
        <parameters managerid='13' typeid='3193047' typeidversion='4'
instanceid='70bf45f9-01a8-f5ee-3c0f-e25a0a2e44a6'/>
      </virtualport>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
    </interface>

If that fails, then either there's something wrong with your virtualport element, or there is a bug that's unrelated to the new code added for this feature.

If it succeeds, then there may be something wrong with the new logical switch code in libvirt (because it effectively creates the above interface definition out of the <interface> and <network> definitions you provided in the failing case above).

Comment 19 xhu 2011-08-04 08:07:43 UTC
(In reply to comment #18)
> This error sounds like you don't have a vepa-capable switch connected to the
> ethernet. If you don't, then this error is expected, and you can't test vepa
> mode. If that's the case, then you can mark this bug verified because you've
> tested everything you are able to test, and all of the tests passed.
> 
> If you *do* have a vepa-capable switch, first see if you can successfully start
> a domain using this <interface> definition instead:
> 
>     <interface type='direct'>
>       <mac address='52:54:00:1b:6f:e5'/>
>       <source dev='eth0' mode='vepa'/>
>       <virtualport type='802.1Qbg'>
>         <parameters managerid='13' typeid='3193047' typeidversion='4'
> instanceid='70bf45f9-01a8-f5ee-3c0f-e25a0a2e44a6'/>
>       </virtualport>
>       <model type='virtio'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
> function='0x0'/>
>     </interface>
> 
> If that fails, then either there's something wrong with your virtualport
> element, or there is a bug that's unrelated to the new code added for this
> feature.
> 
> If it succeeds, then there may be something wrong with the new logical switch
> code in libvirt (because it effectively creates the above interface definition
> out of the <interface> and <network> definitions you provided in the failing
> case above).

for the switch is not vepa-capable, so I change the bug to verified status.

Comment 20 Daniel Veillard 2011-08-15 02:59:53 UTC
The documentation in upstream commit 073ef15c876a8257a077b8b3aa054da2d6ca2ef9
also  need to be pulled in for this bug,

Daniel

Comment 21 Laine Stump 2011-11-16 15:52:07 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
When bridged and direct connections are used, the network interface definition of guests managed by libvirt can have host-specific information embedded in the guest config; for example in direct mode, the name of the physical device being used, or in bridge mode the name of the bridge device. In order to make migrations between non-identical hosts possible, this RFE provides a method of removing the host-specific items in the guest's network interface config, placing it in a libvirt virtual network definition instead. The guest can then simply reference the network to use by name, avoiding the necessity to put host-specific info in the guest config. At run-time libvirt will look up the guest definition for the current host, and use that information (which may be different for each host) to setup the guest's network connectivity.

Note that, in addition to making migration possible, this RFE allows setting up "pools" of physical interfaces for use in direct mode - rather than the config for each guest needing to specify a particular device (which must then be reserved for that guest even when it's not running), the guest just references a network - libvirt will then locate an unused (or the least used, depending on which is appropriate) interface, and use that interface instead.

Comment 22 errata-xmlrpc 2011-12-06 10:52:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1513.html


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