LinuxCommandLibrary

krunvm

manages lightweight microVMs

TLDR

Create microVM

$ krunvm create [image] --name [myvm]
copy
Start microVM
$ krunvm start [myvm]
copy
List microVMs
$ krunvm list
copy
Delete microVM
$ krunvm delete [myvm]
copy
Create with port mapping
$ krunvm create [image] --name [vm] -p [8080:80]
copy
Set CPU and memory
$ krunvm create [image] --cpus [2] --mem [1024]
copy

SYNOPSIS

krunvm command [options]

DESCRIPTION

krunvm is a tool for creating and managing lightweight microVMs built from OCI container images. It uses libkrun, a library that leverages KVM virtualization to run each workload in its own minimal virtual machine, providing stronger isolation than containers while maintaining a container-like user experience with fast startup times and low memory overhead.
MicroVMs are created from standard container images pulled from registries, so existing container workflows and images can be reused directly. Each VM can be configured with a specific number of CPUs, memory allocation, and port mappings, similar to container runtime options. The result is a workflow that feels like managing containers but with the security boundaries of hardware virtualization, making krunvm well suited for multi-tenant environments or workloads that require stronger isolation guarantees.

PARAMETERS

create IMAGE

Create microVM from image.
start NAME
Start microVM.
delete NAME
Delete microVM.
list
List microVMs.
--name NAME
VM name.
--cpus N
Number of CPUs.
--mem MB
Memory in MB.
-p MAPPING
Port mapping.

CAVEATS

Linux with KVM required. Container images as base. Lightweight isolation.

HISTORY

krunvm was created by Red Hat as a simple tool for managing microVMs using libkrun virtualization.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community