Bug 1805612

Summary: Network problems in User session Connection in virt-manager
Product: [Fedora] Fedora Reporter: Jan Vlug <jan.public>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 31CC: berrange, crobinso, philip.wyett
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-08-31 21:10:42 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:

Description Jan Vlug 2020-02-21 07:48:45 UTC
Description of problem:
I created a new virtual machine via the virt-manager GUI. But it is not connected to a network. When I go to Connection Details | Virtual Networks, no networks are displayed on the left of the screen.

Note that the VM is part of the 'QEMU/KVM User session'. In the 'QUEM/KVM' connection the 'default' virtual is available.

When I try to create a new network in the 'QEMU/KVM User session', I get this error message:

Error creating virtual network: error creating bridge interface virbr1: Operation not permitted

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 75, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/createnet.py", line 472, in _async_net_create
    netobj.create()
  File "/usr/lib64/python3.7/site-packages/libvirt.py", line 3068, in create
    if ret == -1: raise libvirtError ('virNetworkCreate() failed', net=self)
libvirt.libvirtError: error creating bridge interface virbr1: Operation not permitted

Actually, I do not know why I have two types of connections, the 'QEMU/KVM' and the 'QEMU/KVM User session'. I cannot remember to have deliberately created another connectionn next to the 'QEMU/KVM'. Maybe the 'QEMU/KVM User session' is a result of having created VMs with GNOME Boxes.

Version-Release number of selected component (if applicable):
virt-manager.noarch 2.2.1-2.fc31

Comment 1 Cole Robinson 2020-08-31 21:10:42 UTC
Thanks for the report. Yes qemu:///session is what gnome-boxes uses. virt-manager uses qemu:///system by default. You probably added qemu:///session to virt-manager manually at some point to see your gnome-boxes VMs.

virtual networks can not be managed with qemu:///session. You can use 'virbr0' directly by selecting 'Manual bridge' in the network config section and adding virbr0 in that field.
The reasons are complicated and it's all kind of confusing unfortunately.

Generally I suggest if you are using qemu:///session with virt-manager to see your gnome-boxes VMs, only create VMs in gnome-boxes, don't try to mix and match