{"id":107,"date":"2013-11-26T14:21:11","date_gmt":"2013-11-26T19:21:11","guid":{"rendered":"https:\/\/xkahn.zoned.net\/blog\/?p=107"},"modified":"2015-01-22T10:48:05","modified_gmt":"2015-01-22T15:48:05","slug":"networking-and-gnome-boxes","status":"publish","type":"post","link":"https:\/\/xkahn.zoned.net\/blog\/2013\/11\/26\/networking-and-gnome-boxes\/","title":{"rendered":"Networking and GNOME Boxes"},"content":{"rendered":"<p><strong>Note: This article applies to GNOME 3.10 in Fedora 20. You no longer need these steps in GNOME 3.14 in Fedora 21.<\/strong><\/p>\n<p>I&#8217;m setting up an <a title=\"Alfresco Wiki\" href=\"http:\/\/wiki.alfresco.com\/\">Alfresco<\/a> server and I need to test some of the tweaks and configuration I&#8217;m working with. Alfresco is big; lots of components including Java, an application server, usually a front end server, a database, etc., etc. \u00c2\u00a0In 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.<\/p>\n<p>This is the perfect use-case for an Virtual Machine.<\/p>\n<p>So I started virt-manager to get started. I configured a VM, but &#8230; failed. It seems that virt-manager wants to place the image for the virtual machine under\u00c2\u00a0\/var\/lib\/libvirt\/images. However the \/var tree on my laptop is fairly small. I don&#8217;t have the space to install a whole other OS there. My home directory, on the other hand, has plenty of space.<\/p>\n<p>This is a perfect use-case for <a href=\"https:\/\/wiki.gnome.org\/action\/show\/Apps\/Boxes\">GNOME Boxes<\/a>.<\/p>\n<p>And, in fact, GNOME Boxes is awesome. Setting up the VM and making it run was easy, quick, and pleasent. \u00c2\u00a0Until it wasn&#8217;t.<\/p>\n<p>You see, GNOME Boxes uses isolated networking. The Virtual Machine can connect to external hosts, but nothing can connect into it. After 2 days of struggling, here is how to fix it on Fedora 19:<\/p>\n<ul>\n<li>Shut down the virtual machine.<\/li>\n<li>Get the name <em>or<\/em> id of your virtual machine. Run, from the command to get the name:<\/li>\n<\/ul>\n<pre style=\"padding-left: 30px;\">$ virsh -c qemu:\/\/\/session list --all<\/pre>\n<ul>\n<li>Edit your VM&#8217;s configuration file using <tt><b>virsh<\/b><\/tt> as below: (My VM is named rhel6.4, so that&#8217;s what I used. You may need to use the ID of the VM, if available.)<\/li>\n<\/ul>\n<pre style=\"padding-left: 30px;\">$ virsh edit rhel6.4<\/pre>\n<ul>\n<li>Find the lines that look like this:<\/li>\n<\/ul>\n<pre style=\"padding-left: 30px;\">&lt;interface type='user'&gt;\r\n &lt;mac address='52:54:00:bf:c5:97'\/&gt;\r\n &lt;model type='rtl8139'\/&gt;\r\n &lt;address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'\/&gt;\r\n&lt;\/interface&gt;<\/pre>\n<ul>\n<li>Remove those lines and replace them with: (If you are not using Fedora, it&#8217;s possible that your network device is not named &#8220;<tt><b>virbr0<\/b><\/tt>&#8220;. You can get a list of all the interface names using <tt><b>ifconfig<\/b><\/tt>.)<\/li>\n<\/ul>\n<pre style=\"padding-left: 30px;\">&lt;interface type='bridge'&gt;\r\n &lt;mac address='00:16:3e:1a:b3:4a'\/&gt;\r\n &lt;source bridge='virbr0'\/&gt;\r\n &lt;model type='virtio'\/&gt;\r\n &lt;address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'\/&gt;\r\n&lt;\/interface&gt;<\/pre>\n<ul>\n<li>Start the VM, and you should be all set!<\/li>\n<\/ul>\n<p>Easy, right?<\/p>\n<p>Well, maybe you&#8217;re still having problems? Some troubleshooting tips:<\/p>\n<ul>\n<li>You may not have bridging set up. Check <tt><b>\/etc\/qemu\/bridge.conf<\/b><\/tt> to see that it contains the line:<\/li>\n<\/ul>\n<pre style=\"padding-left: 30px;\">allow virbr0<\/pre>\n<ul>\n<li>If you want to run or configure your Boxes VM in virt-manager, you need to connect to the user session, which isn&#8217;t possible via the user interface yet. Run:<\/li>\n<\/ul>\n<pre style=\"padding-left: 30px;\">$ virt-manager -c qemu+unix:\/\/\/session<\/pre>\n<p>If this isn&#8217;t working for you, you can request assistance on IRC at: <a href=\"irc:\/\/irc.gnome.org\/boxes\">#boxes<\/a> on GimpNet. If you do not have an IRC client, you can use <a href=\"http:\/\/chat.mibbit.com\/?server=irc.gimp.org&amp;channel=%23boxes\">this web page<\/a>.<\/p>\n<p>Will this get easier in the future? Absolutely. You can read the discussion and follow the progress on <a href=\"https:\/\/bugzilla.gnome.org\/show_bug.cgi?id=677688\">GNOME Bugzilla<\/a>.<\/p>\n<p><em><strong>Edits on Nov 27, 2013:<\/strong> 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\u00c2\u00a0teuf, zeenix, and elad on IRC for the corrections.<\/em><\/p>\n<p><strong>Edit on Jan 22, 2015:<\/strong> <em>Fixes and improvements to Boxes for GNOME 3.14 make this article out of date &#8212; the changes mentioned here are now the default Boxes configuration.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;m setting up an Alfresco server and I need to test some of the tweaks and configuration I&#8217;m working with. Alfresco is big; lots of components including Java, an application server, usually a\u2026 <span class=\"read-more\"><a href=\"https:\/\/xkahn.zoned.net\/blog\/2013\/11\/26\/networking-and-gnome-boxes\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,3,16],"tags":[],"class_list":["post-107","post","type-post","status-publish","format-standard","hentry","category-gnome","category-technology","category-tips"],"_links":{"self":[{"href":"https:\/\/xkahn.zoned.net\/blog\/wp-json\/wp\/v2\/posts\/107","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xkahn.zoned.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xkahn.zoned.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xkahn.zoned.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xkahn.zoned.net\/blog\/wp-json\/wp\/v2\/comments?post=107"}],"version-history":[{"count":7,"href":"https:\/\/xkahn.zoned.net\/blog\/wp-json\/wp\/v2\/posts\/107\/revisions"}],"predecessor-version":[{"id":118,"href":"https:\/\/xkahn.zoned.net\/blog\/wp-json\/wp\/v2\/posts\/107\/revisions\/118"}],"wp:attachment":[{"href":"https:\/\/xkahn.zoned.net\/blog\/wp-json\/wp\/v2\/media?parent=107"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xkahn.zoned.net\/blog\/wp-json\/wp\/v2\/categories?post=107"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xkahn.zoned.net\/blog\/wp-json\/wp\/v2\/tags?post=107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}