Bug 1214294

Summary: session networking limited to user interfaces only
Product: Red Hat Enterprise Linux 7 Reporter: Vladimir Benes <vbenes>
Component: gnome-boxesAssignee: Zeeshan Ali <zeenix>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: high    
Version: 7.2CC: bgollahe, mclasen, mprivozn, rbalakri, vbenes, vehrlich, virt-bugs, zeenix
Target Milestone: beta   
Target Release: 7.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gnome-boxes-3.14.3.1-2.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1208445 Environment:
Last Closed: 2015-11-19 08:55:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1208445    
Bug Blocks:    

Description Vladimir Benes 2015-04-22 11:21:27 UTC
+++ This bug was initially created as a clone of Bug #1208445 +++

Description of problem:
New rebased boxes should be able to bridge network over virbr0 but it obviously doesn't work.

[test@hp-z400-02 ~]$ virsh -c qemu:///session dumpxml boxes-unknown |grep interface
<interface type='user'>

listing details as discussed:
[test@hp-z400-02 ~]$ rpm -q libvirt-daemon-driver-network
libvirt-daemon-driver-network-1.2.8-16.el7.x86_64

5: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN 
link/ether 52:54:00:6e:eb:25 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
6: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN qlen 500
link/ether 52:54:00:6e:eb:25 brd ff:ff:ff:ff:ff:ff

[test@hp-z400-02 ~]$ cat /etc/qemu-kvm/bridge.conf 
allow virbr0

[test@hp-z400-02 ~]$ rpm -qa qemu*
qemu-img-1.5.3-86.el7.x86_64
qemu-kvm-common-1.5.3-86.el7.x86_64
qemu-guest-agent-2.1.0-4.el7.x86_64
qemu-kvm-1.5.3-86.el7.x86_64

[test@hp-z400-02 ~]$ rpm -qa libvirt*
libvirt-client-1.2.8-16.el7.x86_64
libvirt-daemon-driver-storage-1.2.8-16.el7.x86_64
libvirt-daemon-config-network-1.2.8-16.el7.x86_64
libvirt-glib-0.1.9-1.el7.x86_64
libvirt-gconfig-0.1.9-1.el7.x86_64
libvirt-daemon-config-nwfilter-1.2.8-16.el7.x86_64
libvirt-1.2.8-16.el7.x86_64
libvirt-daemon-driver-network-1.2.8-16.el7.x86_64
libvirt-daemon-driver-nodedev-1.2.8-16.el7.x86_64
libvirt-daemon-kvm-1.2.8-16.el7.x86_64
libvirt-python-1.2.8-7.el7.x86_64
libvirt-daemon-1.2.8-16.el7.x86_64
libvirt-daemon-driver-interface-1.2.8-16.el7.x86_64
libvirt-daemon-driver-secret-1.2.8-16.el7.x86_64
libvirt-daemon-driver-lxc-1.2.8-16.el7.x86_64
libvirt-daemon-driver-qemu-1.2.8-16.el7.x86_64
libvirt-gobject-0.1.9-1.el7.x86_64
libvirt-daemon-driver-nwfilter-1.2.8-16.el7.x86_64


How reproducible:
always

Steps to Reproduce:
1.create vm
2.try to ping host from inside the machine (or vice versa)

Actual results:
no way

Expected results:
should work

--- Additional comment from Michal Privoznik on 2015-04-02 05:47:22 EDT ---

Zeeshan, how does gnome-boxes decide on configuring guest network? In my private IRC conversation I saw domains are using 'user' type interface:

    <interface type='user'>
      <mac address='52:54:00:98:92:aa'/>
      <model type='rtl8139'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>


This is very minimalistic interface provided by qemu which merely knows TCP and UDP, no ICMP.

Vladimir, can you please attach domain XML for transcription sake?

--- Additional comment from Michal Privoznik on 2015-04-02 05:48:27 EDT ---

(In reply to Michal Privoznik from comment #1)
> Zeeshan, how does gnome-boxes decide on configuring guest network? In my
> private IRC conversation I saw domains are using 'user' type interface:

private conversation with Vladimir, should that be.

--- Additional comment from Vladimir Benes on 2015-04-02 05:51:10 EDT ---



--- Additional comment from Zeeshan Ali on 2015-04-02 09:55:27 EDT ---

(In reply to Michal Privoznik from comment #2)
> (In reply to Michal Privoznik from comment #1)
> > Zeeshan, how does gnome-boxes decide on configuring guest network? In my
> > private IRC conversation I saw domains are using 'user' type interface:
> 
> private conversation with Vladimir, should that be.

Boxes checks if:

* virbr0 iface is available and up.
* greps for "^allow.*virbr0" line in /etc/qemu/bridge.conf.

If these checks out, Boxes adds a bridge network to new VMs, user-mode network otherwise.

--- Additional comment from Michal Privoznik on 2015-04-02 10:10:09 EDT ---

(In reply to Zeeshan Ali from comment #4)
> (In reply to Michal Privoznik from comment #2)
> > (In reply to Michal Privoznik from comment #1)
> > > Zeeshan, how does gnome-boxes decide on configuring guest network? In my
> > > private IRC conversation I saw domains are using 'user' type interface:
> > 
> > private conversation with Vladimir, should that be.
> 
> Boxes checks if:
> 
> * virbr0 iface is available and up.
> * greps for "^allow.*virbr0" line in /etc/qemu/bridge.conf.

Aha! This may be the problem. Reporter has file under different location:
/etc/qemu-kvm/bridge.conf

But with the same content. Could this be a bug?

--- Additional comment from Vladimir Benes on 2015-04-02 11:09:27 EDT ---

(In reply to Michal Privoznik from comment #5)
> (In reply to Zeeshan Ali from comment #4)
> > (In reply to Michal Privoznik from comment #2)
> > > (In reply to Michal Privoznik from comment #1)
> > > > Zeeshan, how does gnome-boxes decide on configuring guest network? In my
> > > > private IRC conversation I saw domains are using 'user' type interface:
> > > 
> > > private conversation with Vladimir, should that be.
> > 
> > Boxes checks if:
> > 
> > * virbr0 iface is available and up.
> > * greps for "^allow.*virbr0" line in /etc/qemu/bridge.conf.
> 
> Aha! This may be the problem. Reporter has file under different location:
> /etc/qemu-kvm/bridge.conf
> 
> But with the same content. Could this be a bug?

Yes, this seems to be one part of the problem. Boxes should look into qemu-kvm directory as well but there is one more thing that prevents non-user networking and that is virbr0 in down state.

If I create any system broker machine and start it I can see virbr0 in up state with vnet0 or similar network attached and whole virbr0 up and running. Now I am able to create a machine with non-user networking (via tap0 device).

In Fedora 21 there is a tap0 device created after VM is created in Boxes and virbr0 goes up as well. Tap0 creation doesn't happen in RHEL7 unless other system broker machine is up and running (virbr0 up). I am not sure if this second part of upping virbr0 (and attaching a tap0 into it) is a matter of libvirt or Boxes as well.

--- Additional comment from Zeeshan Ali on 2015-04-15 09:30:15 EDT ---

(In reply to Vladimir Benes from comment #6)
> (In reply to Michal Privoznik from comment #5)
> > (In reply to Zeeshan Ali from comment #4)
> > > (In reply to Michal Privoznik from comment #2)
> > > > (In reply to Michal Privoznik from comment #1)
> > > > > Zeeshan, how does gnome-boxes decide on configuring guest network? In my
> > > > > private IRC conversation I saw domains are using 'user' type interface:
> > > > 
> > > > private conversation with Vladimir, should that be.
> > > 
> > > Boxes checks if:
> > > 
> > > * virbr0 iface is available and up.
> > > * greps for "^allow.*virbr0" line in /etc/qemu/bridge.conf.
> > 
> > Aha! This may be the problem. Reporter has file under different location:
> > /etc/qemu-kvm/bridge.conf
> > 
> > But with the same content. Could this be a bug?
> 
> Yes, this seems to be one part of the problem. Boxes should look into
> qemu-kvm directory

If you haven't already, please file a bug a separate bug about this.

> as well but there is one more thing that prevents
> non-user networking and that is virbr0 in down state.

I think that is likely some libvirt issue. Maybe we can have this bug for that and re-assign to libvirt?

--- Additional comment from Michal Privoznik on 2015-04-15 11:50:15 EDT ---

(In reply to Zeeshan Ali from comment #7)
> (In reply to Vladimir Benes from comment #6)
> > (In reply to Michal Privoznik from comment #5)
> > > (In reply to Zeeshan Ali from comment #4)
> > > > (In reply to Michal Privoznik from comment #2)
> > > > > (In reply to Michal Privoznik from comment #1)
> > > > > > Zeeshan, how does gnome-boxes decide on configuring guest network? In my
> > > > > > private IRC conversation I saw domains are using 'user' type interface:
> > > > > 
> > > > > private conversation with Vladimir, should that be.
> > > > 
> > > > Boxes checks if:
> > > > 
> > > > * virbr0 iface is available and up.
> > > > * greps for "^allow.*virbr0" line in /etc/qemu/bridge.conf.
> > > 
> > > Aha! This may be the problem. Reporter has file under different location:
> > > /etc/qemu-kvm/bridge.conf
> > > 
> > > But with the same content. Could this be a bug?
> > 
> > Yes, this seems to be one part of the problem. Boxes should look into
> > qemu-kvm directory
> 
> If you haven't already, please file a bug a separate bug about this.
> 
> > as well but there is one more thing that prevents
> > non-user networking and that is virbr0 in down state.
> 
> I think that is likely some libvirt issue. Maybe we can have this bug for
> that and re-assign to libvirt?

Agreed. Vladimir, can you please attach libvirt logs so that I can trace down the issue?

http://wiki.libvirt.org/page/DebugLogs

Comment 1 Vladimir Benes 2015-04-22 11:22:53 UTC
just to be clear:

this bug should be about gnome-boxes incorrectly looking into /etc/qemu/bridge.conf instead of /etc/qemu-kvm/bridge.conf

Comment 5 errata-xmlrpc 2015-11-19 08:55:30 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.

https://rhn.redhat.com/errata/RHBA-2015-2253.html