{"id":24099,"date":"2015-05-13T08:48:33","date_gmt":"2015-05-13T06:48:33","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/?p=24099"},"modified":"2015-05-13T08:52:52","modified_gmt":"2015-05-13T06:52:52","slug":"vagrant-libvirt-fedora-21","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2015\/05\/13\/vagrant-libvirt-fedora-21\/","title":{"rendered":"Vagrant adventures on Fedora 21"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p>I spent a large chunk of yesterday experimenting with <a href=\"https:\/\/www.vagrantup.com\/\">Vagrant<\/a> on my <a href=\"https:\/\/getfedora.org\/\">Fedora 21<\/a> laptop. \u00a0I&#8217;ve used it before of course, but a friend asked for help with something I was planning to play with for a long time, so it\u00a0unexpectedly lead me into a journey.<\/p>\n<p>Let&#8217;s start simple. \u00a0If you want the least possible amount of hassle with running Vagrant on Fedora, you should use it with Oracle <a href=\"https:\/\/www.virtualbox.org\/\">VirtualBox<\/a> provider (sometimes also called hypervisor). \u00a0 It works great! \u00a0The only troubles with this approach is that VirtualBox relies on a kernel module (kmod-VirtualBox RPM), which has to match your current running kernel version to a digit. \u00a0This kernel module is NOT part of the official Fedora repositories, and, instead, can be found in the <a href=\"http:\/\/rpmfusion.org\/\">RPM Fusion<\/a> yum repository (rpmfusion-free-updates). \u00a0This means that sometimes, when Fedora releases a kernel update, it might take a few days for the RPM Fusion repository to catch up with the kmod-VirtualBox updates. \u00a0And this, of course, might result in your Vagrant setup being broken.<\/p>\n<p>The easiest way to protect against that is to disable automatic kernel, kernel module and VirtualBox updates. \u00a0To do so, add the following line to the <em>[main]<\/em> section of your <em>\/etc\/yum.conf<\/em> file, right after your VirtualBox\/vagrant setup started to work:<\/p>\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\">exclude=kernel* kmod-* VirtualBox*<\/pre>\n<p>Now, if you forgot to do that a few times got pissed off with this situation (or don&#8217;t like Oracle for some reason), you might consider alternatives. \u00a0Which are a few. \u00a0Vagrant supports a variety of hypervisors. \u00a0 One of the common alternatives is to use <a href=\"http:\/\/libvirt.org\/\">libvirt<\/a>, which is shipped with Fedora distribution.<\/p>\n<p>Installing libvirt is simple (thanks to <a href=\"https:\/\/ttboj.wordpress.com\/2013\/12\/09\/vagrant-on-fedora-with-libvirt\/\">this blog post<\/a>). \u00a0Here&#8217;s pretty much all you have to do:<\/p>\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\">\r\nyum install libvirt libvirt-daemon libvirt-daemon-qemu virt-manager\r\nservice libvirtd restart\r\n<\/pre>\n<p>The problem that you might realize now is that libvirt is not the most popular provider for boxes in the Vagrant world. \u00a0Most people seem to prefer VirtualBox. \u00a0But if your choices are satisfied, I&#8217;m glad for you. \u00a0If they are not, however, there is a work around that you might go for &#8211; <a href=\"https:\/\/github.com\/sciurus\/vagrant-mutate\">vagrant mutate plugin<\/a>. \u00a0This plugin converts vagrant boxes from one hypervisor to another.<\/p>\n<p>In order to install this plugin on Fedora 21 you&#8217;ll need a few development tools first (<a href=\"http:\/\/stackoverflow.com\/questions\/12952913\/how-do-i-install-g-for-fedora\">this StackOverflow thread<\/a> definitely helped with the weird g++ error):<\/p>\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\">yum install ruby-devel gcc-c++ make<\/pre>\n<p>Once you have those, install the vagrant plugin with your regular user (the one who will run vagrant VMs):<\/p>\n<pre class=\"brush: plain; light: true; title: ; notranslate\" title=\"\">vagrant plugin install vagrant-mutate<\/pre>\n<p>Now you can mutate Vagrant boxes. \u00a0Unfortunately, you might find that <a href=\"https:\/\/github.com\/sciurus\/vagrant-mutate\/issues\/52\">mutate plugin doesn&#8217;t like boxes with\u00a0slash<\/a> in their names (like <a href=\"https:\/\/atlas.hashicorp.com\/chef\/boxes\/centos-6.5\">chef\/centos-6.5<\/a>). \u00a0The suggested workaround is to either use box names without slashes, or to provide mutate plugin with the box URLs, rather than names. \u00a0The <a href=\"https:\/\/atlas.hashicorp.com\/boxes\/search\">official boxes directory<\/a> doesn&#8217;t give you URLs though, so you might be stack with random GitHub repositories or with an alternative directory, like <a href=\"http:\/\/www.vagrantbox.es\/\">Vagrantbox.es<\/a>.<\/p>\n<p>My adventures with this aren&#8217;t over yet. \u00a0 Feel free to send suggestions my way. \u00a0From my side, here are a couple of other useful links on this subject:<\/p>\n<ul>\n<li>It looks like the upcoming Fedora 22 will <a href=\"http:\/\/fedoramagazine.org\/using-fedora-22-atomic-vagrant-boxes\/\">handle things better<\/a>.<\/li>\n<li>If you are using Vagrant boxes on Windows, you are probably familiar with <a href=\"http:\/\/jeremykendall.net\/2013\/08\/09\/vagrant-synced-folders-permissions\/\">file permission issues<\/a> across synced folders.<\/li>\n<li>If you want to have several VMs with Vagrant, here are some <a href=\"http:\/\/kad.blegh.net\/vagrant-libvirt-multiple-vms.html\">handy configuration snippets<\/a> for those who aren&#8217;t well versed in Ruby.<\/li>\n<\/ul>\n<p>One last bit of advise from me is that until you are absolutely sure that your Vagrant setup works perfectly, stick to 32-bit box images. \u00a0There&#8217;s nothing like ripping your hair out for three hours only to learn that your host hardware is 32-bit while you are trying to boot into a 64-bit operating system.<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>I spent a large chunk of yesterday experimenting with Vagrant on my Fedora 21 laptop. \u00a0I&#8217;ve used it before of course, but a friend asked for help with something I was planning to play with for a long time, so it\u00a0unexpectedly lead me into a journey. Let&#8217;s start simple. \u00a0If you want the least possible &hellip; <a href=\"https:\/\/mamchenkov.net\/wordpress\/2015\/05\/13\/vagrant-libvirt-fedora-21\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Vagrant adventures on Fedora 21<\/span><\/a><\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Vagrant adventures on Fedora 21 #Fedora #Linux #SysAdmin #WebDev #Vagrant http:\/\/bit.ly\/1cMVIqU","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[1,6,18,133,62,1334],"tags":[2351,3346,3104,1330],"keyring_services":[],"class_list":["post-24099","post","type-post","status-publish","format-standard","hentry","category-general","category-linux","category-programming","category-sysadmin","category-technology","category-web-work","tag-fedora-linux","tag-vagrant","tag-virtualization","tag-web-development"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":24935,"url":"https:\/\/mamchenkov.net\/wordpress\/2015\/11\/04\/fedora-23-and-upgrade-issues\/","url_meta":{"origin":24099,"position":0},"title":"Fedora 23 and upgrade issues","author":"Leonid Mamchenkov","date":"November 4, 2015","format":false,"excerpt":"\u00a0 Fedora 23 has been released yesterday, and as a big fan and a long time user I had to upgrade my laptop (from Fedora 22) immediately. \u00a0Or at least try. Usually, the process is quite simple and doesn't take much figuring out. \u00a0This time it was somewhat different though.\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"fedora","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2015\/11\/fedora-500x212.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":26677,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/09\/10\/stackoverflow-docker-vs-vagrant-with-project-authors-comments\/","url_meta":{"origin":24099,"position":1},"title":"StackOverflow: Docker vs. Vagrant, with project authors&#8217; comments","author":"Leonid Mamchenkov","date":"September 10, 2016","format":false,"excerpt":"There is this discussion over at StackOverflow:\u00a0Should I use Vagrant or Docker for creating an isolated environment?\u00a0It attracted the attention of the authors of both projects (as well as many other smart people). \u00a0Read the whole thing for interesting insights into what's there now and what's coming. \u00a0If you'd rather\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":35955,"url":"https:\/\/mamchenkov.net\/wordpress\/2019\/02\/24\/introduction-to-microservices-docker-and-kubernetes\/","url_meta":{"origin":24099,"position":2},"title":"Introduction to Microservices, Docker, and Kubernetes","author":"Leonid Mamchenkov","date":"February 24, 2019","format":false,"excerpt":"There is plenty of documentation, tutorials, and guides online, explaining Docker containers, Kubernetes container orchestration, and microservices. Here are a few that I found useful for the quick and simple introduction into these technologies and how to tie them together. Firstly, some basic 101s: Docker 101: Fundamentals & The DockerfileKubernetes\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/img.youtube.com\/vi\/1xo-0gCVhTU\/0.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":22267,"url":"https:\/\/mamchenkov.net\/wordpress\/2014\/07\/26\/upgrading-fedora-14-to-fedora-20-is-always-fun\/","url_meta":{"origin":24099,"position":3},"title":"Upgrading Fedora 14 to Fedora 20 is always fun!","author":"Leonid Mamchenkov","date":"July 26, 2014","format":false,"excerpt":"I'm upgrading my wife's laptop from Fedora 14 to Fedora 20. \u00a0That's plenty of fun! \u00a0I've done this before with other machines, but memory isn't my strongest suit. \u00a0First, preupgrade fails complaining that there are no repositories anymore. \u00a0That's to be expected, with even Fedora 18 being passed end of\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":7473,"url":"https:\/\/mamchenkov.net\/wordpress\/2004\/04\/27\/fedora-tracker\/","url_meta":{"origin":24099,"position":4},"title":"Fedora Tracker","author":"Leonid Mamchenkov","date":"April 27, 2004","format":false,"excerpt":"I've just read in LWN about recently announced Fedora Tracker. The goal of the project is to have a central database of apt and yum repositories with search facilities. This sounds like a very nice idea, since finding some Fedora RPM packages is not an easy task. I've check it\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":42578,"url":"https:\/\/mamchenkov.net\/wordpress\/2019\/05\/02\/fedora-30\/","url_meta":{"origin":24099,"position":5},"title":"Fedora 30","author":"Leonid Mamchenkov","date":"May 2, 2019","format":false,"excerpt":"Fedora 30 has been released a few days ago. In the long list of changes, the most interesting to me are: Upgrade to Bash 5Upgrade to PHP 7.3 (more specifically 7.3.4)Deprecation of \/etc\/sysconfig\/nfs in favor of \/etc\/nfs.conf I've already upgraded my laptop to this version and everything seems to work\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/05\/fedora30.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/05\/fedora30.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/05\/fedora30.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2019\/05\/fedora30.jpg?resize=700%2C400&ssl=1 2x"},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/24099","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=24099"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/24099\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=24099"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=24099"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=24099"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=24099"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}