Networking and GNOME Boxes

Note: This article applies to GNOME 3.10 in Fedora 20. You no longer need these steps in GNOME 3.14 in Fedora 21.

I’m setting up an Alfresco server and I need to test some of the tweaks and configuration I’m working with. Alfresco is big; lots of components including Java, an application server, usually a front end server, a database, etc., etc. In addition, it is certified to work with a narrow set of other software. For example, Alfresco certifies against Red Hat Enterprise Linux 6, but my development machine is Fedora 19. Red Hat Enterprise Linux 6 comes with MySQL, but Alfresco certifies against a much more recent version.

This is the perfect use-case for an Virtual Machine.

So I started virt-manager to get started. I configured a VM, but … failed. It seems that virt-manager wants to place the image for the virtual machine under /var/lib/libvirt/images. However the /var tree on my laptop is fairly small. I don’t have the space to install a whole other OS there. My home directory, on the other hand, has plenty of space.

You may not have bridging set up. Check /etc/qemu/bridge.conf to see that it contains the line:

allow virbr0

If you want to run or configure your Boxes VM in virt-manager, you need to connect to the user session, which isn’t possible via the user interface yet. Run:

$ virt-manager -c qemu+unix:///session

If this isn’t working for you, you can request assistance on IRC at: #boxes on GimpNet. If you do not have an IRC client, you can use this web page.

Will this get easier in the future? Absolutely. You can read the discussion and follow the progress on GNOME Bugzilla.

Edits on Nov 27, 2013: Virt Manager and Boxes do NOT need to be shut down while editing the VM details. There is a virsh command to get a list of VM names. Your network interface may not match mine if you are not running Fedora. Add link to the #boxes channel on IRC. Add in troubleshooting section for users without bridged networking configured. You do NOT need to run the VM using virt-manager after this configuration change, Boxes will handle it fine. Add in the Bugzilla link. Thanks to teuf, zeenix, and elad on IRC for the corrections.

Edit on Jan 22, 2015:Fixes and improvements to Boxes for GNOME 3.14 make this article out of date — the changes mentioned here are now the default Boxes configuration.

5 thoughts on “Networking and GNOME Boxes”

Hi Ben! I’m using Boxes. The host machine OS is Fedora 21; The guest OS is CentOS 7. After change VM’s configuration file, I get message ‘Failed to start’ CentOS 7. If you have any idea to correct this misstake, please help me.

Hi Gennadiy,
Hmmm… I’ll check it out. I had thought that networking was fixed for Gnome Boxes in time for Fedora 21. But I just replicated what you did — installing Centos 7 inside Fedora 21, and I see that the host can connect to the VM, but nothing else.

This is “as-designed” right now. You should not need to make these modifications on Fedora 21; they are now the default. At the end, you get an IP address that can be accessed by the host. You can set up forwarding routes on the host if you want.

Creating a VM in Boxes with an externally routable IP address is a different thing. Maybe I’ll post about how to do that soon. In the meantime, I’ll edit this post to mention that you no longer need to make any changes on Fedora 21.