Bug 1148012 - RFE: Allow qemu-bridge-helper to be used to implement guestfs_set_network
Summary: RFE: Allow qemu-bridge-helper to be used to implement guestfs_set_network
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On: 1146320 1147057
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-30 14:10 UTC by Richard W.M. Jones
Modified: 2014-10-03 09:49 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-10-02 22:11:49 UTC
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2014-09-30 14:10:24 UTC
Description of problem:

See: https://lists.fedoraproject.org/pipermail/virt/2014-September/004179.html
and followups.

qemu has a setuid program called 'qemu-bridge-helper' which
apparently we can use to connect to virbr0 and get real
networking instead of using SLIRP.

This would only apply to the libvirt backend.

Comment 1 Laine Stump 2014-09-30 14:54:50 UTC
On a system that is already doing this for boxes, all that would be required would be to use the following interface definition:

  <interface type='bridge'>
    <source bridge='virbr0'/>
    ...
  </interface>

the bridge helper looks in /etc/qemu/bridge.conf to see which bridges it can use, and which users can request taps connected to those bridges. On Fedora at least, by default this file contains:

   allow virbr0

which means that any uid can request a new tap device connected to virbr0. Apparently, this particular bridge.conf file is installed as part of the qemu-common package.

Comment 2 Richard W.M. Jones 2014-09-30 15:08:55 UTC
That change would be quite simple to make in libguestfs .. but
using virbr0 would require dhcp I think?  Unfortunately the
guestfs appliance would really like a fixed IP address assigned
in advance.  I guess we might be able to run dhclient, assuming
there is not too much speed penalty.

Comment 4 Richard W.M. Jones 2014-10-02 11:41:01 UTC
v2 patch:
https://www.redhat.com/archives/libguestfs/2014-October/msg00007.html

Comment 5 Richard W.M. Jones 2014-10-02 15:37:16 UTC
Patches upstream, but blocked by bug 1146320 on Rawhide.


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