According to the author of this post:

gnome-boxes originally used usermode networking, but switched around Fedora 21 timeframe to use virbr0 via qemu-bridge-helper. But that's dependent on virbr0 being set up correctly by the host admin, or via package install (libvirt-daemon-config-network package on Fedora).

Could someone explain how to achieve the same behaviour under Arch Linux? Especially, if the libvirtd service need to be started or not?


I will post the steps I used, in case someone has a similar usecase:

Using gnome-boxes in session mode to create and run windows guests without qemu:///session default networking 'user'.

create this file with the following content : /etc/qemu/bridge.conf

# allow virbr0

virbr0 is the bridge used by libvirt for qemu:///system for the "default" network (NAT network).

Enabling the libvirtd service, will create and start the bridge automatically and take care of the bound to the necessary interface automatically. (In my case a laptop with wireless connection)

# systemctl enable libvirtd.service

I modified the interface entry for the VM to use "bridge" instead of "user":

virsh -c qemu:///session edit domainName

and change this section :

<interface type='user'>
      <mac address='52:54:00:0b:8f:07'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>

to use the bridge interface :

<interface type='bridge'>
      <mac address='52:54:00:0b:8f:07'/>
      <source bridge='virbr0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>

Using virt-manager is also possible.

You should create a new connection to qemu:///session (virt-manager defaults to qemu:///system).

Change the network type from user mode to shared mode and specify the bridge name.

The following steps allow me to use tap devices for networking, which improves the network performance for qemu:///session.

The same interface is used for Internet access and for host communication. (ping, smb, etc.)

System used :

Arch Linux x64 with latest available packages linux 4.12.12-1-ARCH gnome-boxes 3.24.0 libvirt 3.7.0-1 virt-manager 1.4.2-2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.