Vagrant Box - LIBVIRT QEMU


_ Let’s say I want to try openbsd , you don’t really to spend hours or day finding spare hardware and try it. Go to AWS, they may not be offering this os. Maybe you want build from scratch your live os and upload to AWS ami.

To intall the libvirt plugin vagrant plugin install vagrant-libvirt and initialze BSD box to run vagrant init -m  generic/openbsd6.

vagrant up –provider=libvirt

Finding other boxes - VAGRANT BOXES SEARCH LINK it automatically download from the repo.


Kernel-based – QEMU - Virtual Machine (KVM) is a virtualization module in the Linux kernel that allows the kernel to function as a hypervisor. It was merged into the Linux kernel mainline in kernel version 2.6.20 KVM requires a processor with hardware virtualization extensions, such as Intel VT or AMD-V in BIOS setting.

Vagrant is an open-source software product for building and maintaining portable virtual software development platforms on such as (VirtualBox, KVM, Hyper-V, Docker containers, VMware, and AWS).

Vagrant init file

To take a look at the Vagrantfile openbsd as simple as that…

Vagrant.configure("2") do |config| = "generic/openbsd6"


export LIBVIRT_DEFAULT_URI=qemu:///system

╰─$ virsh list --all
 Id   Name             State
 2    bsd_default      running

What about you want to add other distro boxes or preparing downloading the boxes. You can add centos box to local host by running vagrant box add centos/7 or Ubuntu vagrant box add generic/ubuntu1604 / vagrant box add generic/ubuntu1804

## init a box

vagrant init hashicorp/bionic64

## Once you want to delete the box

vagrant destroy

Accecss the box

virsh console bsd  or vagrant ssh