[Incus] Installation
Introduction
Incus est un gestionnaire de conteneur LXC et de machines virtuelles. Il est très rapide et s'accompagne d'une interface graphique qui aide grandement à la gestion des instances.
Sources
Installation
Debian
Pour installer incus et qemu-system (pour la virtualisation) :
apt install -y curl gpg && curl -fsSL https://pkgs.zabbly.com/key.asc | gpg --show-keys --fingerprint && mkdir -p /etc/apt/keyrings/ && curl -fsSL https://pkgs.zabbly.com/key.asc -o /etc/apt/keyrings/zabbly.asc && sh -c 'cat <<EOF > /etc/apt/sources.list.d/zabbly-incus-stable.sources
Enabled: yes
Types: deb
URIs: https://pkgs.zabbly.com/incus/stable
Suites: $(. /etc/os-release && echo ${VERSION_CODENAME})
Components: main
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/zabbly.asc
EOF' && apt update && apt install -y incus qemu-system
Pour installer incus-ui mettez le contenu suivant dans le fichier /etc/apt/sources.list.d/osamuaoki.sources :
Types: deb
URIs: https://osamuaoki.github.io/debian/
Suites: sid
Components: main
Signed-By:
-----BEGIN PGP PUBLIC KEY BLOCK-----
.
mDMEZZpSFhYJKwYBBAHaRw8BAQdA9T6mXRx7Zc64kQC+dKB2RgxNHK0+KFlCT8b/
JtFAWRu0HU9zYW11IEFva2kgPG9zYW11QGRlYmlhbi5vcmc+iJIEExYIADsCGwMF
CwkIBwIGFQoJCAsCBBYCAwECHgECF4AWIQTYnmsJtCCYzq8IGrFtbTgJIV9yDQUC
ZZpXMAIZAQAKCRBtbTgJIV9yDc+YAQDhuq/q76qobfHKi8C2MT83u1qZkg2eCpEF
UkyvrE59fwD4+d+IbCls19F3MCRuEmyvYQr+sghC82lnUiFOxUq/DbQhT3NhbXUg
QW9raSA8b3NhbXUuYW9raUBnbWFpbC5jb20+iJAEExYIADgWIQTYnmsJtCCYzq8I
GrFtbTgJIV9yDQUCZZpVVQIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRBt
bTgJIV9yDehWAP9lG8DUBwUPl0kCTezQItOxQfDXgJ0Lyhv8dv4B1iWxjgEA8YBv
gCgDGby+pQmRX/STM7fu5LG62785oIj17HuMaQG4OARlmlIWEgorBgEEAZdVAQUB
AQdA+q2tgbmHC7MQv5bTHyawYrITRw7Gdg7M0p0+oSRtzS8DAQgHiHgEGBYIACAC
GwwWIQTYnmsJtCCYzq8IGrFtbTgJIV9yDQUCZZpU3QAKCRBtbTgJIV9yDdz6AQC8
yC8mQnwkj9D2x84oSdEpAckJ/e47kLDN3y/HIOwXbAD/ZCv2Ek1Exh/7SrxNL65J
ipPuCsH1vTsxbEE14mEs2Ag=
=IDSM
-----END PGP PUBLIC KEY BLOCK-----
# This is written in DEB822-STYLE FORMAT as described in sources.list (5)
Puis faite :
apt update && apt install incus-ui-canonical
Configurez incus :
incus admin init [--minimal]
Rendez-vous sur https://<IP>:8443 pour accéder à l'interface graphique.
Vous devez ensuite télécharger le certificat au format .crt sur le serveur et exécuter la commande suivante :
incus config trust add-certificate incus-ui.crt
Puis importez le certificat également dans votre navigateur, pour Firefox :
about:preferences#privacy
Puis descendez jusqu'à trouver Afficher les certificats et rendez vous dans Vos Certificats puis cliquez sur Importer et sélectionnez le fichier au format .pfx .
Manuel
Créer un pool de stockage BTRFS
incus storage create pool-01 btrfs
Ici le pool s'appellera pool-01 .
Créer un réseau NAT
incus network create incusbr0 --type=bridge
Connecter le réseau Host à une interface
incus network attach-profile enp1s0 default eth0
Ici l'interface virtuelle eth0 (à remplacer par le nom de l'interface de votre VM) sera connectée sur l'interface physique enp1s0 de l'hôte.
Créer un conteneur
incus launch images:almalinux/9 ct-almalinux --storage pool-01