DEV Community

hardyweb
hardyweb

Posted on • Updated on

Nasted Incus in WSL2

Incus merupakan perisian linux container fork dari lxd. ia sebahagian daripada Linuxcontainer.org , manakala lxd dahulunya merupakan projek kerjasama antara Linuxcontainer dan Canonical. Namun begitu, lxd telah diambilalih oleh syarikat Canonical dan berpisah dengan Linuxcontainer.Boleh baca di sini

  1. Create satu container
incus launch images:debain/12 cluster1
Enter fullscreen mode Exit fullscreen mode
  1. Set security.nesting true, security.privileged true
incus config set cluster1 security.nesting true
Enter fullscreen mode Exit fullscreen mode
incus config set cluster1 security.privilegde true
Enter fullscreen mode Exit fullscreen mode
  1. Install sekali lagi incus dalam container clouster1 tadi.
curl -fsSL https://pkgs.zabbly.com/key.asc -o /etc/apt/keyrings/zabbly.asc
Enter fullscreen mode Exit fullscreen mode
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'
Enter fullscreen mode Exit fullscreen mode
apt-get update
Enter fullscreen mode Exit fullscreen mode
apt install incus
Enter fullscreen mode Exit fullscreen mode
  1. Setelah selesai install incus dalam cluster1. Cluster ini dijadikan sebagai backup untuk cipta beberapa cluster lain.

  2. Copy cluster1 kepada cluster-utama

incus cp cluster1 cluster-utama

Enter fullscreen mode Exit fullscreen mode

Masukkan command ini dalam .wslconfig

kernelCommandLine = cgroup_no_v1=all to .wslconfig

Enter fullscreen mode Exit fullscreen mode

bersambung

Top comments (0)