Created
February 4, 2024 14:56
-
-
Save jcassette/71506988fadcd3a39c4a3b7e15f29c1a to your computer and use it in GitHub Desktop.
TrueNAS SCALE LXC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| set -e | |
| chmod +x /usr/bin/apt* | |
| chmod +x /usr/bin/dpkg | |
| apt install lxc | |
| cat >> /etc/lxc/default.conf << EOF | |
| lxc.net.0.type = macvlan | |
| lxc.net.0.link = enp4s0 | |
| lxc.net.0.flags = up | |
| EOF | |
| zfs create tank/lxc | |
| cat >> /etc/lxc/lxc.conf << EOF | |
| lxc.lxcpath = /mnt/tank/lxc | |
| EOF | |
| echo "Done. You may execute these commands:" | |
| echo " sudo lxc-create -n foo -t debian -- --release stable" | |
| echo " sudo lxc-start foo" | |
| echo " sudo lxc-attach foo" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment