こちらを参考にしました。
Incus
インストール
sudo pacman -S incus
sudo systemctl start incus
sudo pacman -S btrfs-progs
バージョンの確認
$ incus --version
0.5
初期化
incus admin init
コンテナーのインストール
incus launch images:archlinux/current/amd64 arch
確認
$ incus list
+------+---------+----------------------+------+-----------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+------+---------+----------------------+------+-----------+-----------+
| arch | RUNNING | 10.56.160.101 (eth0) | | CONTAINER | 0 |
+------+---------+----------------------+------+-----------+-----------+
接続
incus exec arch bash
$ incus exec arch bash
[root@arch ~]#
login 後のインストールと設定
ユーザー、パスワードの設定
useradd -u 1200 -m -g wheel uchida
passwd uchida
sudo のインストール
pacman -S sudo
visudo で設定
%wheel ALL=(ALL:ALL) ALL %wheel ALL=(ALL:ALL) NOPASSWD: ALL %sudo ALL=(ALL:ALL) ALL
avahi のインストール
sudo pacman -S avahi
sudo systemctl start avahi-daemon
sudo systemctl enable avahi-daemon
/etc/pacman.d/mirrorlist の更新
次のファイルで差し替えます。
/etc/pacman.d/mirrorlist
################################################################################
################# Arch Linux mirrorlist generated by Reflector #################
################################################################################
# With: reflector @/etc/xdg/reflector/reflector.conf
# When: 2024-01-23 05:03:47 UTC
# From: https://archlinux.org/mirrors/status/json/
# Retrieved: 2024-01-23 05:01:35 UTC
# Last Check: 2024-01-23 04:52:26 UTC
Server = https://geo.mirror.pkgbuild.com/$repo/os/$arch
Server = https://mirror.lty.me/archlinux/$repo/os/$arch
Server = https://mirror.moson.org/arch/$repo/os/$arch
Server = https://ftp.sh.cvut.cz/arch/$repo/os/$arch
Server = https://archlinux.mailtunnel.eu/$repo/os/$arch
Server = https://mirror.f4st.host/archlinux/$repo/os/$arch
Server = https://mirror.cyberbits.eu/archlinux/$repo/os/$arch
Server = https://md.mirrors.hacktegic.com/archlinux/$repo/os/$arch
Server = https://mirror.sunred.org/archlinux/$repo/os/$arch
Server = https://archlinux.thaller.ws/$repo/os/$arch
Server = https://mirror.pseudoform.org/$repo/os/$arch
Server = https://mirror.ufscar.br/archlinux/$repo/os/$arch
Server = https://at.arch.mirror.kescher.at/$repo/os/$arch
Server = https://de.arch.mirror.kescher.at/$repo/os/$arch
Server = https://mirror.theo546.fr/archlinux/$repo/os/$arch
Server = https://america.mirror.pkgbuild.com/$repo/os/$arch
Server = https://asia.mirror.pkgbuild.com/$repo/os/$arch
Server = https://europe.mirror.pkgbuild.com/$repo/os/$arch
Server = https://sydney.mirror.pkgbuild.com/$repo/os/$arch
Server = https://mirror.ubrco.de/archlinux/$repo/os/$arch