Incus

Container-Management-System.

Installation

sudo apt update
sudo apt install incus

Initialisierung

sudo incus admin init

Beispiel-Konfiguration:

Would you like to use clustering? (yes/no) [default=no]: no
Name of the storage backend to use (btrfs, dir, lvm, zfs, ceph) [default=zfs]: dir
Would you like to create a new local network bridge? (yes/no) [default=yes]: yes
What should the new bridge be called? [default=incusbr0]: incusbr0
What IPv4 address should be used? (CIDR subnet notation, "auto" or "none") [default=auto]: auto
What IPv6 address should be used? (CIDR subnet notation, "auto" or "none") [default=auto]: auto
Would you like Incus to be available over the network? (yes/no) [default=no]: yes
Address to bind Incus to (not including port) [default=all]: 0.0.0.0
Port to bind Incus to [default=8443]: 8443
Trust password for new clients: [password]
Would you like stale cached images to be updated automatically? (yes/no) [default=yes]: yes
Would you like a YAML "incus admin init" preseed to be printed? (yes/no) [default=no]: no

Grundlegende Befehle

Profile anzeigen

incus profile list
incus profile show default

Container verwalten

# Container erstellen
incus launch ubuntu:22.04 mycontainer

# Container auflisten
incus list

# Container stoppen
incus stop mycontainer

# Container starten
incus start mycontainer

# Container löschen
incus delete mycontainer

Shell-Zugriff

incus exec mycontainer -- bash

Netzwerk

incus network list
incus network show incusbr0

Storage

incus storage list
incus storage show default

Remote-Verbindungen

# Remote hinzufügen
incus remote add myremote https://remote.example.com:8443

# Remotes auflisten
incus remote list

# Remote wechseln
incus remote switch myremote

Images

# Images auflisten
incus image list

# Image erstellen
incus publish mycontainer --alias myimage

# Image exportieren
incus image export myimage

Zurück zur Container-Übersicht