How To Install vagrant-libvirt on Kali Linux

In this tutorial we learn how to install vagrant-libvirt on Kali Linux. vagrant-libvirt is Vagrant plugin that adds an Libvirt provider to Vagrant

Introduction

In this tutorial we learn how to install vagrant-libvirt on Kali Linux.

What is vagrant-libvirt

vagrant-libvirt is:

vagrant-libvirt allows Vagrant to control and provision machines via Libvirt toolkit.

It has many relevant features:

  • Control local Libvirt hypervisors.
  • Upload box image (qcow2 format) to Libvirt storage pool.
  • Create volume as COW diff image for domains.
  • Create private networks.
  • Create and boot Libvirt domains.
  • SSH into domains.
  • Setup hostname and network interfaces.
  • Provision domains with any built-in Vagrant provisioner.
  • Synced folder support via rsync, nfs or 9p.
  • Snapshots via sahara.
  • Package caching via vagrant-cachier.
  • Use boxes from other Vagrant providers via vagrant-mutate.

There are three methods to install vagrant-libvirt on Kali Linux. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install vagrant-libvirt Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install vagrant-libvirt using apt-get by running the following command:

sudo apt-get -y install vagrant-libvirt

Install vagrant-libvirt Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install vagrant-libvirt using apt by running the following command:

sudo apt -y install vagrant-libvirt

Install vagrant-libvirt Using aptitude

If you want to follow this method, you might need to install aptitude on Kali Linux first since aptitude is usually not installed by default on Kali Linux. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install vagrant-libvirt using aptitude by running the following command:

sudo aptitude -y install vagrant-libvirt

How To Uninstall vagrant-libvirt on Kali Linux

To uninstall only the vagrant-libvirt package we can use the following command:

sudo apt-get remove vagrant-libvirt

Uninstall vagrant-libvirt And Its Dependencies

To uninstall vagrant-libvirt and its dependencies that are no longer needed by Kali Linux, we can use the command below:

sudo apt-get -y autoremove vagrant-libvirt

Remove vagrant-libvirt Configurations and Data

To remove vagrant-libvirt configuration and data from Kali Linux we can use the following command:

sudo apt-get -y purge vagrant-libvirt

Remove vagrant-libvirt configuration, data, and all of its dependencies

We can use the following command to remove vagrant-libvirt configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge vagrant-libvirt

Dependencies

vagrant-libvirt have the following dependencies:

References

Summary

In this tutorial we learn how to install vagrant-libvirt package on Kali Linux using different package management tools: apt, apt-get and aptitude.