Skip to content
Français
Conteneurs & Orchestration medium

First steps with Incus: launching containers and VMs

15 min de lecture

Read this page in French

incus logo

Once Incus is installed, everything goes through one coherent CLI: incus launch creates an instance, incus exec runs commands inside it, incus snapshot saves it. This guide walks the essential gestures on real examples: launch a container, launch a virtual machine, get inside, take a snapshot, adjust the configuration, and manage the lifecycle. Everything was tested on Incus 7.0. For anyone discovering Incus after the installation.

What you will learn

  • Launch a container and a virtual machine (incus launch).
  • Run commands and open a shell (incus exec).
  • List and inspect instances (incus list, incus info).
  • Take and restore a snapshot.
  • Manage the lifecycle (start, stop, delete).

Launching your first container

The key command is incus launch <image> <name>. Images come by default from the images: remote, the official image server.

Fenêtre de terminal
incus launch images:debian/13 c1

In a few seconds the container starts and gets an address on incusbr0:

Fenêtre de terminal
incus list
+------+---------+-----------------------+-----------+
| NAME | STATE | IPV4 | TYPE |
+------+---------+-----------------------+-----------+
| c1 | RUNNING | 10.173.191.191 (eth0) | CONTAINER |
+------+---------+-----------------------+-----------+

Getting inside the instance

To run a command inside, use incus exec <name> -- <command>:

Fenêtre de terminal
incus exec c1 -- cat /etc/os-release
# PRETTY_NAME="Debian GNU/Linux 13 (trixie)"

For an interactive shell, incus shell (or incus exec c1 -- bash):

Fenêtre de terminal
incus shell c1

That is the whole difference with Docker: an Incus container is a complete system (with systemd, services, users), not a single process. You connect to it like a small machine.

Inspecting an instance

incus list gives the overview; incus info details one instance (state, type, resources, network):

Fenêtre de terminal
incus info c1
# Name: c1
# Status: RUNNING
# Type: container
# Architecture: x86_64

To see the images cached locally:

Fenêtre de terminal
incus image list

Launching a virtual machine

The same launch creates a full virtual machine with the --vm option (QEMU) instead of a container:

Fenêtre de terminal
incus launch images:ubuntu/24.04 vm1 --vm
+------+---------+-------------------------+-----------------+
| NAME | STATE | IPV4 | TYPE |
+------+---------+-------------------------+-----------------+
| vm1 | RUNNING | 10.173.191.248 (enp5s0) | VIRTUAL-MACHINE |
+------+---------+-------------------------+-----------------+

Same commands, two technologies: incus exec vm1 -- ... works in the virtual machine just as in the container, thanks to the built-in agent.

Taking a snapshot

Before a risky operation, incus snapshot create freezes the instance state:

Fenêtre de terminal
incus snapshot create c1 snap0
incus snapshot list c1
+-------+----------------------+------------+----------+
| NAME | TAKEN AT | EXPIRES AT | STATEFUL |
+-------+----------------------+------------+----------+
| snap0 | 2026/06/30 20:59 UTC | | NO |
+-------+----------------------+------------+----------+

If something goes wrong, restore with incus snapshot restore c1 snap0. The snapshot captures the disk; add --stateful to also freeze the memory of a running instance.

Adjusting the configuration

Resources are set live with incus config set:

Fenêtre de terminal
incus config set c1 limits.memory=512MiB
incus config get c1 limits.memory
# 512MiB

You limit CPU the same way (limits.cpu=2), add devices (disk, network card, port forwarding), and enable automatic start (boot.autostart=true).

Managing the lifecycle

Fenêtre de terminal
incus stop c1 # stop
incus start c1 # start
incus restart c1 # restart
incus delete c1 # delete (a stopped instance)
incus delete c1 --force # force deletion of a running instance

A deleted instance is gone for good, along with its snapshots: remember to export or back up what matters first.

Key points

  • incus launch images:<distro> <name> creates and starts an instance from the images: remote.
  • Add --vm for a virtual machine instead of a container; the same commands apply.
  • incus exec runs a command, incus shell opens a shell: an Incus container is a complete system.
  • incus snapshot create saves the state; restore with snapshot restore.
  • incus config set tunes memory, CPU and devices live.

FAQ: common questions about first steps with Incus

Next steps

Is this site useful to you?

Fewer than 1% of readers support this site.

I maintain more than 700 free guides, with no ads and no tracking. Any support, even a symbolic one, helps cover hosting and keeps these resources free. Thank you for the help.

The form does not show? Open Ko-fi in a new tab.

Subscribe and follow my DevSecOps work on LinkedIn