I use Vagrant
with the vagrant-libvirt
plugin on my Arch Linux host quite extensively to quickly spin up dev and lab environments. The plugin’s development is mature and generally feature-complete, but the latest release
was June 24, 2023. In the meantime, multiple commits were added to the main
branch.
I use the following process rather than the standard installation sourced from RubyGems .
Prerequisites
Verify these Arch packages are installed:
pacman -Q git vagrant dnsmasq iptables-nft libvirt qemu-base bridge-utils ruby pkgconf gcc make
Steps
Open your favorite terminal emulator.
Uninstall the existing
vagrant-libvirt
plugin (if required).
vagrant plugin uninstall vagrant-libvirt
- Clone the
vagrant-libvirt
repo from GitHub.
git clone https://github.com/vagrant-libvirt/vagrant-libvirt.git
- Change to the
vagrant-libvirt
directory.
cd vagrant-libvirt
- Edit the
driver.rb
file.
vim lib/vagrant-libvirt/driver.rb
- Remove the
ip_command
variable and thelibvirt_ip_command
key that references it.
|
|
- Build the
vagrant-libvirt
plugin.
gem build
- Install the
vagrant-libvirt
plugin.
VAGRANT_DISABLE_STRICT_DEPENDENCY_ENFORCEMENT=1 vagrant plugin install ./vagrant-libvirt-*.gem