podvirt wraps KubeVirt's virt-launcher container image with Podman, giving you a simple CLI to create, start, stop, and manage VMs using the same underlying technology as KubeVirt. This is useful on Atomic distros like Fedora Silverblue where you might not have the required packages layered to quickly spin up virtual machines.
For more on the back story behind the project, see the blog post podvirt.
- Create and run VMs from a simple YAML config or CLI flags
- Uses KubeVirt's
virt-launcher - Rootless operation via Podman (user only needs
/dev/kvmaccess) - Full VM lifecycle:
create,start,stop,list,status,delete,console,ssh,clean-cache - SSH access via cloud-init key injection and auto-detected port forwarding
- Serial console access (attach to
virsh consoleviapodman exec)- Table, JSON, and YAML output formats
| Component | Requirement |
|---|---|
| Podman | v5.0+ |
| KVM | /dev/kvm must exist; user must be in kvm group |
git clone https://github.com/brianmcarey/podvirt
cd podvirt
make build
sudo install -m 755 bin/podvirt /usr/local/bin/podvirtTagged releases are intended to include:
- Linux
x86_64andaarch64tarballs - raw Linux binaries
- RPM packages
If you are installing manually from a release tarball:
tar -xzf podvirt_<version>_linux_x86_64.tar.gz
sudo install -m 755 podvirt /usr/local/bin/podvirtsystemctl --user enable --now podman.socketsudo usermod -aG kvm $USER
# Log out and back in for group membership to take effectpodvirt create --name myvm --cpus 2 --memory 2Gi \
--image quay.io/containerdisks/fedora:43 \
--ssh-key ~/.ssh/ssh-key.pub \
--user fedora \
--port 2222:22
podvirt start myvm
podvirt ssh myvmpodvirt create --config examples/fedora-vm.yaml
podvirt start fedora-vmpodvirt console fedora-vm # serial by default
podvirt console fedora-vm --type vnc
podvirt console fedora-vm --type serialpodvirt stop fedora-vm
podvirt delete fedora-vm| Command | Description |
|---|---|
podvirt create |
Create a VM (not started) |
podvirt start <name> |
Start a VM |
podvirt stop <name> |
Stop a VM |
podvirt list |
List all VMs |
podvirt status <name> |
Show detailed VM status |
podvirt delete <name> |
Delete a VM |
podvirt console <name> |
Connect to VM console |
podvirt ssh <name> |
SSH into a running VM |
podvirt clean-cache |
Remove cached podvirt data |
Run podvirt <command> --help for full flag documentation.
VMs are described in a simple YAML format:
apiVersion: podvirt.io/v1alpha1
kind: VirtualMachine
metadata:
name: my-vm
spec:
cpu:
cores: 2
memory: 2Gi
disks:
- name: rootdisk
source:
image: /var/lib/podvirt/images/fedora-43.qcow2
bus: virtio
networks:
- name: default
type: masquerade
portForwards:
- hostPort: 2222
vmPort: 22
cloudInit:
user: fedora
sshKeys:
- ssh-ed25519 AAAA... user@host
console:
type: vnc
port: 5900See docs/configuration.md for the full schema reference and CLI flag documentation.
Example configs are in examples/.
podvirt CLI
│
├─► Podman API ──► virt-launcher container
│ │
│ ├── libvirt (internal, no host daemon)
│ └── QEMU/KVM virtual machine
│
└─► podman exec virsh ──► query domain state
Each VM runs as a Podman container using the quay.io/kubevirt/virt-launcher image. The virt-launcher process manages libvirt and QEMU internally, so no host-level daemons are needed.
The VM specification is passed via the STANDALONE_VMI environment variable as a JSON-encoded KubeVirt VirtualMachineInstance object.
Two disk source types are supported:
Local file (qcow2 or raw):
source:
image: /path/to/disk.qcow2Container disk (OCI image from a registry):
source:
containerImage: quay.io/containerdisks/fedora:43Container disks are pulled automatically. See quay.io/containerdisks for available images.
For cache behavior, extraction details, and cleanup guidance, see docs/storage.md.
The default virt-launcher image is:
quay.io/kubevirt/virt-launcher:v1.8.3
Override it per-VM with the --launcher-image flag:
podvirt create --config vm.yaml --launcher-image quay.io/kubevirt/virt-launcher:v1.7.0Set PODVIRT_DEBUG=1 to preserve extra runtime diagnostics:
PODVIRT_DEBUG=1 podvirt create --name debugvm --image quay.io/containerdisks/fedora:43When debug mode is enabled, additional logs may be written under ~/.cache/podvirt/libvirt-logs/.
Apache 2.0 — see LICENSE.