Linux Kernel & KVM
Linux host running kernel 5.10+ with hardware virtualization (/dev/kvm) enabled in BIOS/UEFI.
This guide walks you through installing PiVirt (pvcli), setting up host prerequisites, and launching your first virtual machine in minutes.
Before installing PiVirt, ensure your host environment meets the following requirements:
Linux Kernel & KVM
Linux host running kernel 5.10+ with hardware virtualization (/dev/kvm) enabled in BIOS/UEFI.
System Resources
Minimum 4GB RAM and 20GB free disk space for host services and initial OS images.
Administrative Access
root or sudo access required for KVM device management and network bridge setup.
Build Tools (Optional)
Go 1.22+ is only required if you choose to build pvcli and pivirtd from source code.
Select your preferred installation method below:
Install pivirtd (hypervisor daemon) and pivirtctl (host management CLI) directly from the official PiLab Package Repository (dl.pilab.hu), built via GoReleaser:
# 1. Add PiLab GPG signing keysudo mkdir -p /etc/apt/keyringscurl -fsSL https://dl.pilab.hu/pivirt.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/pilab.gpg
# 2. Add PiLab APT repositoryecho "deb [signed-by=/etc/apt/keyrings/pilab.gpg] https://dl.pilab.hu/deb stable main" | sudo tee /etc/apt/sources.list.d/pilab.list
# 3. Update & Install pivirtd (bundles pivirtd + pivirtctl)sudo apt-get updatesudo apt-get install -y pivirtd
# 4. Enable and start the servicesudo systemctl enable --now pivirtdInstall pivirtd and pivirtctl via YUM/DNF from the official PiLab RPM repository:
# 1. Add PiLab RPM repositorysudo tee /etc/yum.repos.d/pilab.repo << 'EOF'[pilab]name=PiLab Packagesbaseurl=https://dl.pilab.hu/rpmenabled=1gpgcheck=1gpgkey=https://dl.pilab.hu/pivirt.gpgEOF
# 2. Install pivirtdsudo dnf install -y pivirtd
# 3. Enable and start the servicesudo systemctl enable --now pivirtdDownload the latest pre-compiled pvcli executable directly into your PATH:
# Download executablecurl -L https://github.com/pilab-dev/pivirt/releases/latest/download/pvcli-linux-amd64 -o /usr/local/bin/pvcli
# Make executablechmod +x /usr/local/bin/pvcli
# Verify versionpvcli versionCompile the binaries directly from the official source repository:
Clone Repository:
git clone https://github.com/pilab-dev/pivirt.gitcd pivirtCompile Binary:
make build-pvcliInstall to PATH:
sudo cp bin/pvcli /usr/local/bin/Run pvcli inside an isolated container with host KVM pass-through:
docker run --rm -it \ --privileged \ -v /dev/kvm:/dev/kvm \ pilab-cloud/pvcli:latest vm listFollow these step-by-step instructions to initialize PiVirt, pull an operating system image, and boot a virtual machine instance:
Initialize CLI Configuration
Generate your user configuration file at ~/.config/pvcli/config.yaml:
pvcli config initDiscover and Pull an OS Image
List available OS images managed by osinfodb and pull Ubuntu 24.04:
# List available imagespvcli image list
# Download Ubuntu 24.04 imagepvcli image pull ubuntu-24.04Create the Virtual Machine Instance
Specify your VM configuration via CLI flags or launch the interactive configuration wizard:
# Create with declarative CLI flagspvcli vm create \ --name web-server \ --image ubuntu-24.04 \ --cpus 2 \ --memory 4G \ --disk 20G \ --network bridge=virbr0
# Or run without flags for the interactive TUI wizardpvcli vm createStart and Access the Virtual Machine
Power on the VM instance and connect via serial console or VNC:
# Power on the virtual machinepvcli vm start web-server
# Inspect runtime details (IP, TAP interface, VNC port)pvcli vm info web-server
# Attach to serial consolepvcli vm console web-serverIf KVM acceleration is missing:
# Verify KVM supportkvm-ok
# Load host kernel modulessudo modprobe kvm_intel # For Intel CPUssudo modprobe kvm_amd # For AMD CPUssudo modprobe vhost_netAdd your user to the kvm system group to access /dev/kvm without root:
sudo usermod -aG kvm $USER# Log out and log back in for group changes to take effectIf virbr0 does not exist on your host, create a default Linux bridge:
cat > /etc/netplan/01-bridge.yaml <<EOFnetwork: version: 2 bridges: virbr0: interfaces: [eth0] dhcp4: yesEOFsudo netplan apply
# Verify bridge creationbrctl show virbr0