Bug 1208445

Summary: session networking limited to user interfaces only
Product: Red Hat Enterprise Linux 7 Reporter: Vladimir Benes <vbenes>
Component: libvirtAssignee: Michal Privoznik <mprivozn>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.2CC: mprivozn, rbalakri, vbenes, zeenix
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1214294 (view as bug list) Environment:
Last Closed: 2015-05-05 17:22:48 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:    
Bug Blocks: 1214294    
Attachments:
Description Flags
xml dump of affected vm none

Description Vladimir Benes 2015-04-02 09:42:48 UTC
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

Comment 1 Michal Privoznik 2015-04-02 09:47:22 UTC
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?

Comment 2 Michal Privoznik 2015-04-02 09:48:27 UTC
(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.

Comment 3 Vladimir Benes 2015-04-02 09:51:10 UTC
Created attachment 1010093 [details]
xml dump of affected vm

Comment 4 Zeeshan Ali 2015-04-02 13:55:27 UTC
(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.

Comment 5 Michal Privoznik 2015-04-02 14:10:09 UTC
(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?

Comment 6 Vladimir Benes 2015-04-02 15:09:27 UTC
(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.

Comment 7 Zeeshan Ali 2015-04-15 13:30:15 UTC
(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?

Comment 8 Michal Privoznik 2015-04-15 15:50:15 UTC
(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 9 Vladimir Benes 2015-04-22 12:33:53 UTC
hmm, somehow cannot reproduce now, after symlinking /etc/qemu/bridge.conf with /etc/qemu-kvm/bridge.conf I can successfully start machine and tap0 device is created and virbr0 goes up. 
Closing now, will reopen if it occurs again.

Comment 10 Zeeshan Ali 2015-05-05 17:04:18 UTC
(In reply to Vladimir Benes from comment #9)
> hmm, somehow cannot reproduce now, after symlinking /etc/qemu/bridge.conf
> with /etc/qemu-kvm/bridge.conf I can successfully start machine and tap0
> device is created and virbr0 goes up. 
> Closing now, will reopen if it occurs again.

Well having to symlink is also a bug.

Comment 11 Zeeshan Ali 2015-05-05 17:22:48 UTC
Oh seems you filed another bug for symlink issue. Sorry.

https://bugzilla.redhat.com/show_bug.cgi?id=1214294