cubic-vm/cubic

A lightweight command-line manager for virtual machines

60

stars

644

commits

Rust

primary language

Sep 9, 2026

updated

cubic-vm.org
cli
cloud-init
kvm
linux
qemu
rootless
rust
ssh
virtual-machine
vm
vm-manager

README

Cubic ⭐ Please star us on GitHub to promote the project!

github.com crates.io MSRV snapcraft.io

Cubic spins up Linux virtual machines on Linux, macOS and Windows with a single command.

Every distribution comes as an official image and is ready to use within seconds, so you skip the long installation. Cubic keeps things simple and secure by acting as lightweight glue over proven tools. No privileged system service is required and every VM runs as your normal user. Cubic is built on top of QEMU, EDK2, official Linux distribution images and cloud-init.

Cubic Demo

🧐 Why use Cubic?

One command takes you from nothing to a shell inside a fresh Linux VM. The images are official and verified, downloaded straight from each distribution. Every machine is a real VM, so you get stronger isolation than containers can offer. The same workflow runs on Linux, macOS and Windows across amd64 and arm64. No privileged system service is required and every VM runs as your normal user.

Cubic fits a lot of everyday workflows:

  • Spin up disposable VMs that are ready in seconds and easy to throw away
  • Compare many Linux distributions side by side on any host
  • Develop and test across distributions and CPU architectures
  • Try or build software without polluting your host
  • Run untrusted or experimental software inside an isolated VM
  • Reproduce CI or production Linux environments locally
  • Run local services such as HTTP servers and databases with port forwarding

🔥 Features

Fast and simple

  • Creates a VM and opens a shell in one command
  • Boots official Linux distribution images in seconds
  • Written in Rust

Runs anywhere

  • Runs on Linux, macOS and Windows hosts
  • Ships Alma Linux, Arch Linux, Debian, Fedora, Gentoo, OpenSUSE, Rocky Linux and Ubuntu
  • Runs amd64 and arm64 guests
  • Accelerates every VM with KVM (Linux), Hypervisor (macOS) and WHPX (Windows)

Everyday work

  • Forwards ports from a VM to the host
  • Copies files between host and VM and between two VMs
  • Executes single commands in a VM
  • Creates VM instances from reusable templates
  • Snapshots a VM disk and restores it later
  • Clones and renames VM instances
  • Runs temporary VM instances that are deleted after use
  • Isolates a VM from the network with one flag

Safe by default

  • Runs every VM as a normal user process without a privileged system service
  • Verifies every image against the checksum of the distribution
  • Protects every VM with its own SSH key and a locked password
  • Encrypts the QEMU control channels with mutual TLS

🚀 Quick Start

A virtual machine instance can be created with a single command. This example creates an instance from a Ubuntu image with the name quickstart.

$ cubic run quickstart --image ubuntu:noble
Welcome to Ubuntu 24.04.4 LTS (GNU/Linux 6.8.0-101-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/pro

This system has been minimized by removing packages and content that are
not required on a system that users do not log into.

To restore this content, you can run the 'unminimize' command.

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

cubic@quickstart:~$

Use cubic images to list all supported images.

💫 How to install Cubic?

Ubuntu (Snap)

sudo snap install cubic && \
sudo snap connect cubic:kvm

macOS (Homebrew)

brew install cubic-vm/cubic/cubic

Windows (winget)

winget install cubic-vm.cubic

Others (Cargo)

Install the Rust toolchain and then build Cubic:

cargo install cubic

Cubic needs QEMU and its UEFI firmware on the host. Install them with your package manager:

# Debian/Ubuntu
sudo apt install qemu-system qemu-utils ovmf qemu-efi-aarch64
# Fedora/RHEL
sudo dnf install qemu-system-x86 qemu-img edk2-ovmf edk2-aarch64
# Arch Linux
sudo pacman -S qemu-full edk2-ovmf edk2-armvirt
# openSUSE
sudo zypper install qemu qemu-tools qemu-ovmf-x86_64 qemu-uefi-aarch64
# macOS
brew install qemu
# Windows
winget install SoftwareFreedomConservancy.QEMU

See the install instructions for more information.

💡 How to use Cubic?

Cubic has a simple CLI:

$ cubic --help
Cubic runs Linux virtual machines on Linux, macOS and Windows with a single
command.

Every distribution comes as an official image and is ready to use within
seconds, so you skip the long installation. Cubic keeps things simple and secure
by acting as lightweight glue over proven tools. No privileged system service is
required and every VM runs as your normal user. Cubic is built on top of QEMU,
EDK2, official Linux distribution images and cloud-init.

Examples:

  Create a new VM instance with:
  $ cubic create example --image ubuntu:noble
  Open a shell in the VM instance:
  $ cubic ssh example

  Alternatively, use `run` to execute the above commands in a single command:
  $ cubic run example --image ubuntu:noble

  Show all supported VM images:
  $ cubic images

  List previously created VM instances:
  $ cubic instances

  Show information about a VM instance:
  $ cubic show <instance>

  Execute a command in a VM instance:
  $ cubic exec <instance> <shell command>

  Transfer files and directories between host and VM instance:
  $ cubic scp <path/to/host/file> <instance>:<path/to/guest/file>
  See `cubic scp --help` for more examples

For more information, visit: https://cubic-vm.org/
The source code is located at: https://github.com/cubic-vm/cubic

Usage: cubic [OPTIONS] [COMMAND]

Commands:
  run          Create and start VM instances
  create       Create VM instances
  instances    List VM instances
  images       List VM images
  ports        List ports for VM instances
  show         Show VM images and instances
  modify       Modify VM instances
  console      Open VM instance console
  ssh          Connect to VM instances
  scp          Copy data between host and VM instances
  exec         Execute commands on VM instances
  start        Start VM instances
  stop         Stop VM instances
  restart      Restart VM instances
  rename       Rename VM instances
  clone        Clone VM instances
  snapshot     Create a snapshot of a VM instance
  restore      Restore a VM instance from a snapshot
  delete       Delete VM instances and snapshots
  prune        Clear caches
  completions  Generate shell completion scripts

Options:
  -v, --verbose  Increase logging output
  -q, --quiet    Reduce logging output
  -h, --help     Print help
  -V, --version  Print version

🔨 How to Build Cubic from Source?

See CONTRIBUTING.md for instructions on setting up a development environment and building the project.

💬 How to contribute to Cubic?

We are actively looking for help to improve Cubic. You can help in various ways:

  • 👧 Increase Cubic's user base by installing and using it!
  • ⭐ Star us on Github to promote the project!
  • 🪲 If you found a bug or you are interested in a feature, please create an issue on Github!
  • 👷 If you are a developer and you want to submit a change, please have a look at the contribution page!
  • 📝 If you are a technical writer and you want to improve the documentation, please have a look at the contribution page!

📦 Dependencies

Cubic keeps its dependency tree small and lean, acting as thin glue over proven tools rather than reinventing them.

At runtime Cubic has a single dependency: QEMU, the virtualization engine it drives to run every VM.

Rust CrateUsage
bytesByte buffers used by the stdin detach-shortcut decoder
clapParse CLI commands, arguments, and flags
clap_completeGenerate shell completion scripts
crosstermTerminal control for the interactive console and views
getrandomSecure randomness for SSH key generation
regexParse image and instance names and scrape image version listings
rcgenGenerate the per-instance self-signed certificates for QEMU mTLS
reqwestDownload official Linux distribution images over HTTPS
russhPure-Rust SSH client to connect into VMs
russh-sftpSFTP file transfer over the SSH connection
rustlsTLS for the QEMU mTLS control channel
rustls-pki-typesShared certificate and key types backing rustls
serdeDerive serialization for config and QMP messages
serde_jsonQMP protocol and firmware descriptor parsing
sha2Verify downloaded image checksums
sysinfoRead the host username and detect running QEMU processes
thiserrorDerive the crate's error types
tokioAsync runtime for SSH and SFTP transfers
tokio-rustlsAsync TLS for the QEMU console connection
tokio-utilDetects the console/ssh detach shortcut on stdin
tomlRead and write the instance.toml config

📃 License

Cubic is dual-licensed under Apache and MIT.

Contributors

rogkne

634 commits

TickTockBent

2 commits

ryru

2 commits

GHX5T-SOL

2 commits

cubic-vm/cubic

A lightweight command-line manager for virtual machines

60

stars

644

commits

Rust

primary language

Sep 9, 2026

updated

cubic-vm.org
cli
cloud-init
kvm
linux
qemu
rootless
rust
ssh
virtual-machine
vm
vm-manager

README

Cubic ⭐ Please star us on GitHub to promote the project!

github.com crates.io MSRV snapcraft.io

Cubic spins up Linux virtual machines on Linux, macOS and Windows with a single command.

Every distribution comes as an official image and is ready to use within seconds, so you skip the long installation. Cubic keeps things simple and secure by acting as lightweight glue over proven tools. No privileged system service is required and every VM runs as your normal user. Cubic is built on top of QEMU, EDK2, official Linux distribution images and cloud-init.

Cubic Demo

🧐 Why use Cubic?

One command takes you from nothing to a shell inside a fresh Linux VM. The images are official and verified, downloaded straight from each distribution. Every machine is a real VM, so you get stronger isolation than containers can offer. The same workflow runs on Linux, macOS and Windows across amd64 and arm64. No privileged system service is required and every VM runs as your normal user.

Cubic fits a lot of everyday workflows:

  • Spin up disposable VMs that are ready in seconds and easy to throw away
  • Compare many Linux distributions side by side on any host
  • Develop and test across distributions and CPU architectures
  • Try or build software without polluting your host
  • Run untrusted or experimental software inside an isolated VM
  • Reproduce CI or production Linux environments locally
  • Run local services such as HTTP servers and databases with port forwarding

🔥 Features

Fast and simple

  • Creates a VM and opens a shell in one command
  • Boots official Linux distribution images in seconds
  • Written in Rust

Runs anywhere

  • Runs on Linux, macOS and Windows hosts
  • Ships Alma Linux, Arch Linux, Debian, Fedora, Gentoo, OpenSUSE, Rocky Linux and Ubuntu
  • Runs amd64 and arm64 guests
  • Accelerates every VM with KVM (Linux), Hypervisor (macOS) and WHPX (Windows)

Everyday work

  • Forwards ports from a VM to the host
  • Copies files between host and VM and between two VMs
  • Executes single commands in a VM
  • Creates VM instances from reusable templates
  • Snapshots a VM disk and restores it later
  • Clones and renames VM instances
  • Runs temporary VM instances that are deleted after use
  • Isolates a VM from the network with one flag

Safe by default

  • Runs every VM as a normal user process without a privileged system service
  • Verifies every image against the checksum of the distribution
  • Protects every VM with its own SSH key and a locked password
  • Encrypts the QEMU control channels with mutual TLS

🚀 Quick Start

A virtual machine instance can be created with a single command. This example creates an instance from a Ubuntu image with the name quickstart.

$ cubic run quickstart --image ubuntu:noble
Welcome to Ubuntu 24.04.4 LTS (GNU/Linux 6.8.0-101-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/pro

This system has been minimized by removing packages and content that are
not required on a system that users do not log into.

To restore this content, you can run the 'unminimize' command.

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

cubic@quickstart:~$

Use cubic images to list all supported images.

💫 How to install Cubic?

Ubuntu (Snap)

sudo snap install cubic && \
sudo snap connect cubic:kvm

macOS (Homebrew)

brew install cubic-vm/cubic/cubic

Windows (winget)

winget install cubic-vm.cubic

Others (Cargo)

Install the Rust toolchain and then build Cubic:

cargo install cubic

Cubic needs QEMU and its UEFI firmware on the host. Install them with your package manager:

# Debian/Ubuntu
sudo apt install qemu-system qemu-utils ovmf qemu-efi-aarch64
# Fedora/RHEL
sudo dnf install qemu-system-x86 qemu-img edk2-ovmf edk2-aarch64
# Arch Linux
sudo pacman -S qemu-full edk2-ovmf edk2-armvirt
# openSUSE
sudo zypper install qemu qemu-tools qemu-ovmf-x86_64 qemu-uefi-aarch64
# macOS
brew install qemu
# Windows
winget install SoftwareFreedomConservancy.QEMU

See the install instructions for more information.

💡 How to use Cubic?

Cubic has a simple CLI:

$ cubic --help
Cubic runs Linux virtual machines on Linux, macOS and Windows with a single
command.

Every distribution comes as an official image and is ready to use within
seconds, so you skip the long installation. Cubic keeps things simple and secure
by acting as lightweight glue over proven tools. No privileged system service is
required and every VM runs as your normal user. Cubic is built on top of QEMU,
EDK2, official Linux distribution images and cloud-init.

Examples:

  Create a new VM instance with:
  $ cubic create example --image ubuntu:noble
  Open a shell in the VM instance:
  $ cubic ssh example

  Alternatively, use `run` to execute the above commands in a single command:
  $ cubic run example --image ubuntu:noble

  Show all supported VM images:
  $ cubic images

  List previously created VM instances:
  $ cubic instances

  Show information about a VM instance:
  $ cubic show <instance>

  Execute a command in a VM instance:
  $ cubic exec <instance> <shell command>

  Transfer files and directories between host and VM instance:
  $ cubic scp <path/to/host/file> <instance>:<path/to/guest/file>
  See `cubic scp --help` for more examples

For more information, visit: https://cubic-vm.org/
The source code is located at: https://github.com/cubic-vm/cubic

Usage: cubic [OPTIONS] [COMMAND]

Commands:
  run          Create and start VM instances
  create       Create VM instances
  instances    List VM instances
  images       List VM images
  ports        List ports for VM instances
  show         Show VM images and instances
  modify       Modify VM instances
  console      Open VM instance console
  ssh          Connect to VM instances
  scp          Copy data between host and VM instances
  exec         Execute commands on VM instances
  start        Start VM instances
  stop         Stop VM instances
  restart      Restart VM instances
  rename       Rename VM instances
  clone        Clone VM instances
  snapshot     Create a snapshot of a VM instance
  restore      Restore a VM instance from a snapshot
  delete       Delete VM instances and snapshots
  prune        Clear caches
  completions  Generate shell completion scripts

Options:
  -v, --verbose  Increase logging output
  -q, --quiet    Reduce logging output
  -h, --help     Print help
  -V, --version  Print version

🔨 How to Build Cubic from Source?

See CONTRIBUTING.md for instructions on setting up a development environment and building the project.

💬 How to contribute to Cubic?

We are actively looking for help to improve Cubic. You can help in various ways:

  • 👧 Increase Cubic's user base by installing and using it!
  • ⭐ Star us on Github to promote the project!
  • 🪲 If you found a bug or you are interested in a feature, please create an issue on Github!
  • 👷 If you are a developer and you want to submit a change, please have a look at the contribution page!
  • 📝 If you are a technical writer and you want to improve the documentation, please have a look at the contribution page!

📦 Dependencies

Cubic keeps its dependency tree small and lean, acting as thin glue over proven tools rather than reinventing them.

At runtime Cubic has a single dependency: QEMU, the virtualization engine it drives to run every VM.

Rust CrateUsage
bytesByte buffers used by the stdin detach-shortcut decoder
clapParse CLI commands, arguments, and flags
clap_completeGenerate shell completion scripts
crosstermTerminal control for the interactive console and views
getrandomSecure randomness for SSH key generation
regexParse image and instance names and scrape image version listings
rcgenGenerate the per-instance self-signed certificates for QEMU mTLS
reqwestDownload official Linux distribution images over HTTPS
russhPure-Rust SSH client to connect into VMs
russh-sftpSFTP file transfer over the SSH connection
rustlsTLS for the QEMU mTLS control channel
rustls-pki-typesShared certificate and key types backing rustls
serdeDerive serialization for config and QMP messages
serde_jsonQMP protocol and firmware descriptor parsing
sha2Verify downloaded image checksums
sysinfoRead the host username and detect running QEMU processes
thiserrorDerive the crate's error types
tokioAsync runtime for SSH and SFTP transfers
tokio-rustlsAsync TLS for the QEMU console connection
tokio-utilDetects the console/ssh detach shortcut on stdin
tomlRead and write the instance.toml config

📃 License

Cubic is dual-licensed under Apache and MIT.

Contributors

rogkne

634 commits

TickTockBent

2 commits

ryru

2 commits

GHX5T-SOL

2 commits

Languages

Rust

98.6%