How To Install virt-lightning on RHEL/Rocky/AlmaLinux/Debian/Ubuntu

Virt-Lightning is a lightweight virtual machine management tool created to help developers and system administrators to quickly and consistently deploy VMs for testing or development purposes. It is focused on simplicity, speed and ease of use.

🔥 TRENDING - Our #1 Selling eBook

Mastering KVM Virtualization - The Ultimate eBook

From home labs to production clouds - master KVM Host management, automating KVM administration using Terraform, Vagrant, and cloud automation. This eBook will enable you to build scalable virtual infrastructure that works whether you're learning at home or deploying enterprise solutions. Get your full copy today

Only $10 $20
Get Instant Access →

Virt-lightning provides a user-friendly CLI for creating, managing, and destroying VMs.

Key Features of Virt-Lightning

  1. Integration with libvirt:
  • Builds on libvirt for VM management, ensuring compatibility with standard virtualization tools.
  1. Instant VM Deployment:
  • It leverages cloud-init in configuring VMs during launch, thus ensuring minimal setup time.
  • It caches VM images for instant provisioning.
  1. Predefined OS images:
  • Downloads and caches standard operating system images for reuse.
  • Provides a default image repository or allows users to specify custom images.
  1. Cloud-Init Support:
  • Automates initial VM setup, such as user creation, network configuration, and package installation using YAML-based configuration files.
  1. Lightweight and Developer-Friendly:
  • Focuses on being a developer tool rather than a full-scale virtualization platform.

Installation of virt-lightning

The system requirements required for running virt-lightning are:

  • Python version 3.8 or higher
  • The Python3 binding for libvirt (python3-libvirt) or ‘libvirt-python’ according to pip.
  • Access to libvirt daemon

Installation of virt-lightning

The system requirements required for running virt-lightning are:

  • Python version 3.8 or higher
  • The Python3 binding for libvirt (python3-libvirt) or ‘libvirt-python’ according to pip.
  • Access to libvirt daemon

Installation on RHEL-based systems

Here’s how to install install virt-lightning

  • RHEL 9:
sudo subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
sudo dnf install genisoimage libvirt-devel gcc python3-devel python3-pip
sudo pip3 install virt-lightning
  • Rocky 9 / AlmaLinux 9
sudo dnf -y install epel-release
sudo dnf config-manager --set-enabled crb
sudo dnf install genisoimage libvirt-devel gcc python3-devel python3-pip
sudo pip3 install virt-lightning
  • Rocky 8 / AlmaLinux 8
sudo dnf -y install epel-release
sudo dnf config-manager --set-enabled powertools
sudo dnf install genisoimage libvirt-devel gcc python3-devel python3-pip
sudo pip3 install virt-lightning
  • Debian / Ubuntu
sudo apt update
sudo apt install genisoimage python3-venv pkg-config gcc libvirt-dev python3-dev pipx
pipx ensurepath
pipx install virt-lightning

After the installation is done, add ~/.local/bin/ in your $PATH if it’s not already the case.

echo "export PATH=$PATH:~/.local/bin/" >> ~/.bashrc
source ~/.bashrc

If using zsh then run:

echo "export PATH=$PATH:~/.local/bin/" >> ~/.zshrc
source ~/.zshrc

To prevent permission issues, ensure that the user you are logged in as is a member of the libvirt group.

sudo usermod -aG libvirt $USER
newgrp libvirt

The installation was successful if you can get help page displayed.

virt-lightning --help
# OR vl - short for virt-lightning
vl --help

You can also run vl without a command to see list of accepted commands.

vl

Join our Linux and open source community. Subscribe to our newsletter for tips, tricks, and collaboration opportunities!

Recent Post

Unlock the Right Solutions with Confidence

At CloudSpinx, we don’t just offer services - we deliver clarity, direction, and results. Whether you're navigating cloud adoption, scaling infrastructure, or solving DevOps challenges, our seasoned experts help you make smart, strategic decisions with total confidence. Let us turn complexity into opportunity and bring your vision to life.

Leave a Comment

Your email address will not be published. Required fields are marked *

Related Post

virt-customize is a powerful command-line tool used to customize virtual machine (disk image) by editing configuration files, installing packages, configuring […]

Durham, UK, October 14, 2025 – Although over 95% of all Bitcoins are already in circulation, there are still over […]

When you work with virtual machines, you frequently need to conduct rapid changes to the disk image without booting the […]

Let's Connect

Unleash the full potential of your business with CloudSpinx. Our expert solutions specialists are standing by to answer your questions and tailor a plan that perfectly aligns with your unique needs.
You will get a response from our solutions specialist within 12 hours
We understand emergencies can be stressful. For immediate assistance, chat with us now

Contact CloudSpinx today!

Download CloudSpinx Profile

Discover the full spectrum of our expertise and services by downloading our detailed Company Profile. Simply enter your first name, last name, and email address.