virt-manager Network bridge Operation not permitted

Bug #519572 reported by whatrevolution
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Invalid
Low
Unassigned

Bug Description

~$ uname -a
Linux mainline 2.6.31-19-generic #56-Ubuntu SMP Thu Jan 28 02:39:34 UTC 2010 x86_64 GNU/Linux

~$ apt-show-versions virt-manager
virt-manager/karmic uptodate 0.7.0-3ubuntu1

Expected Result:

That I would navigate Ubuntu 9.10 menus, Applications > System Tools > Virtual Machine Manager, then use this application to connect with KVM/Qemu, then navigate this window's menu to, Edit > Host Details, then move into Virtual Networks tab, and create a network there.

This almost happened.

Actual Result:

Instead, creating a software default 10.0.0.0/8 network causes errors. I tried two forwarding options, Isolated, and NAT to device lo: Both return errors when trying to make the bridge.

After creating the 10.0.0.0/8 network and exiting the original program instance, I restarted it from terminal and tried starting the network again. It is configured for an Isolated network now. Same error.

~$ virt-manager --debug --no-fork
2010-02-09 18:54:53,106 (virt-manager:144): Application startup
/usr/share/virt-manager/virtManager/config.py:79: Warning: g_set_prgname() called multiple times
  properties=props)
2010-02-09 18:54:53,570 (engine:81): About to connect to uris ['qemu:///session']
2010-02-09 18:54:53,578 (connection:144): Bonding masters are: []
2010-02-09 18:54:53,586 (connection:170): Got physical net device /org/freedesktop/Hal/devices/net_56_32_54_10_18_a9
2010-02-09 18:54:53,587 (connection:230): Adding net device virbr0 56:32:54:10:18:a9 /sys/class/net/virbr0 (bridge: None)
2010-02-09 18:54:53,588 (connection:202): Checking for VLANs on /sys/class/net/virbr0
2010-02-09 18:54:53,592 (connection:170): Got physical net device /org/freedesktop/Hal/devices/net_computer_loopback
2010-02-09 18:54:53,594 (connection:230): Adding net device lo 00:00:00:00:00:00 /sys/class/net/lo (bridge: None)
2010-02-09 18:54:53,594 (connection:202): Checking for VLANs on /sys/class/net/lo
2010-02-09 18:54:53,604 (connection:170): Got physical net device /org/freedesktop/Hal/devices/net_00_17_31_10_ef_72
2010-02-09 18:54:53,606 (connection:230): Adding net device eth2 00:17:31:10:ef:72 /sys/class/net/eth2 (bridge: None)
2010-02-09 18:54:53,607 (connection:202): Checking for VLANs on /sys/class/net/eth2
2010-02-09 18:54:53,614 (connection:170): Got physical net device /org/freedesktop/Hal/devices/net_00_14_bf_58_c7_6e
2010-02-09 18:54:53,616 (connection:230): Adding net device eth1 00:14:bf:58:c7:6e /sys/class/net/eth1 (bridge: None)
2010-02-09 18:54:53,617 (connection:202): Checking for VLANs on /sys/class/net/eth1
2010-02-09 18:54:53,621 (connection:170): Got physical net device /org/freedesktop/Hal/devices/net_00_1c_f0_91_79_55
2010-02-09 18:54:53,622 (connection:230): Adding net device eth0 00:1c:f0:91:79:55 /sys/class/net/eth0 (bridge: None)
2010-02-09 18:54:53,623 (connection:202): Checking for VLANs on /sys/class/net/eth0
2010-02-09 18:54:53,676 (engine:320): window counter incremented to 1
2010-02-09 18:54:53,692 (connection:456): Scheduling background open thread for qemu:///session
2010-02-09 18:54:53,693 (connection:586): Background thread is running
2010-02-09 18:54:53,697 (connection:624): Background open thread complete, scheduling notify
2010-02-09 18:54:53,787 (connection:633): Notifying open result
2010-02-09 18:55:44,400 (error:76): Uncaught Error: Error starting network: cannot create bridge 'virbr0': Operation not permitted : Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/host.py", line 252, in start_network
    net.start()
  File "/usr/share/virt-manager/virtManager/network.py", line 71, in start
    self.net.create()
  File "/usr/lib/python2.6/dist-packages/libvirt.py", line 620, in create
    if ret == -1: raise libvirtError ('virNetworkCreate() failed', net=self)
libvirtError: cannot create bridge 'virbr0': Operation not permitted

Thanks for your attention. _o_O/

Revision history for this message
Scott Moser (smoser) wrote :

I'm not sure if this is expected to work with the qemu:///session , rather than qemu:///system

Changed in libvirt (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Dustin Kirkland  (kirkland) wrote : Re: [Bug 519572] Re: virt-manager Network bridge Operation not permitted

I don't think you have enough privileges to do bridge administration
with qemu:///session.

Revision history for this message
Gionn (giovanni.toraldo) wrote :

qemu:///session is the default, it's should be qemu:///system, or the user cannot create any initial vm double-clicking on the default entry.

Revision history for this message
Chris Bainbridge (chris-bainbridge) wrote :

This looks like a dupe of bug #103010 - tun/tap networking (necessary for bridging) does not work in qemu for non-root users.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

qemu:///session runs libvirtd as non-root and does not have the privileges to create a bridge. You must connect to qemu:///system instead. If you add yourself to the 'libvirtd' group, then logout and back in, you will be allowed to connect to qemu:///system. Users in the admin group at the time of libvirt-bin installation are automatically added to this group.

Changed in libvirt (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Sven Sievert (ps1tal1ty) wrote :

When i want to add a virtual network on virt-manager and try to add it as "all physical medium" and "routed" i get this message:

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/createnet.py", line 350, in finish
    self.conn.create_network(xml)
  File "/usr/share/virt-manager/virtManager/connection.py", line 669, in create_network
    net.create()
  File "/usr/lib/python2.6/dist-packages/libvirt.py", line 686, in create
    if ret == -1: raise libvirtError ('virNetworkCreate() failed', net=self)
libvirtError: cannot create bridge 'virbr0': Operation not permitted

I am logged as the User Psi and the user is on the group libvirtd. I tried to reinstall virtmanager and qemu-kvm and then i tried again and it still gives out the message.
The folder /usr/share/virt-manager is owned by root and i tried to change the whole folder and sub-folders to the User Psi or group kvm/libvirtd and it still shows me the message.

Ken Sharp (kennybobs)
tags: added: jammy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.