What to do if Vagrant machine becomes unresponsive (KVM)

If you are using Vagrant with KVM (with vagrant-libvirt plugin) on Fedora, you might have experienced that sometimes the KVM virtual machine becomes unresponsive. Simply put you would wait forever for trying to ssh to the machine using vagrant ssh. It unfortunately happens to me sometimes when my laptop goes to sleep. So the simple answer is to avoid this and to always halt your Vagrant VMs when you finished working. Here is another thing to try out if you that happens and you don’t want to recreate the machine from scratch (vagrant destroy && vagrant up). Continue reading

DNS for your Vagrant needs: with Landrush, libvirt and dnsmasq

Have you ever needed a DNS server that would be visible both on your host and your Vagrant guests? Landrush is one of those things that can pretty much save you. Unfortunately it was designed around VirtualBox and Mac OS, so it does not work on Linux out-of-the-box. And it does not work with libvirt provider at all. Until of course recently since I added the support there. Here is how to make all that work together on Fedora. Continue reading

Debugging Vagrant with pry-byebug

What to do when running Vagrant with --debug flag is not enough? As Vagrant is nothing else than a Ruby program, you can use famous pry gem together with pry-byebug to debug it. The only thing you need to do to use pry from the Vagrant code base is to make sure it’s installed and available in the Vagrant environment. Continue reading