This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux:virtualization:lxc [2019/02/10 16:22] tkilla [Bugfixes] |
linux:virtualization:lxc [2022/01/13 23:08] (current) tkilla [Unprivileged containers] |
||
---|---|---|---|
Line 344: | Line 344: | ||
http:// | http:// | ||
- | | + | FIX: original keyserver is broken! add: --keyserver hkp:// |
+ | |||
+ | |||
+ | | ||
or | or | ||
- | lxc-create -n websrv -t debian-wheezy | + | lxc-create -n websrv -t debian-wheezy |
Start / Stop VS: | Start / Stop VS: | ||
Line 356: | Line 359: | ||
Enter VS: | Enter VS: | ||
lxc-console -n websrv | lxc-console -n websrv | ||
+ | |||
+ | |||
+ | In Buster, use the lxc-download script: | ||
+ | |||
+ | / | ||
+ | lxc-create -t / | ||
Line 366: | Line 375: | ||
lxc-clone --backingstore btrfs --orig vs1 --new vs2 --snapshot | lxc-clone --backingstore btrfs --orig vs1 --new vs2 --snapshot | ||
+ | \\ | ||
+ | ===== Mount external Dirs in Container ===== | ||
+ | |||
+ | The recommended way is to add the mountpoint with a relative path in the VS config: | ||
+ | |||
+ | lxc.mount.entry=/ | ||
+ | |||
+ | |||
+ | Under some cicumstances it does not work (in unprivileged containers), | ||
+ | |||
+ | lxc.mount.entry = /home/test / | ||
+ | |||
+ | Also check Permissions and Ownership. chown to the root ID inside the container. | ||
\\ | \\ | ||
Line 375: | Line 397: | ||
lxc-create -B btrfs -n mycontainer -t ubuntu | lxc-create -B btrfs -n mycontainer -t ubuntu | ||
+ | |||
+ | |||
Line 437: | Line 461: | ||
lxc.id_map = g 0 100000 65536 | lxc.id_map = g 0 100000 65536 | ||
+ | in buster it's called idmap: | ||
+ | lxc.idmap = u 0 100000 65536 | ||
+ | lxc.idmap = g 0 100000 65536 | ||
**shift uuids to another span:** | **shift uuids to another span:** | ||
Line 448: | Line 475: | ||
create container - use download method for unprivileged. jessie is not available, so you can upgrade wheezy and fix systemd error :( | create container - use download method for unprivileged. jessie is not available, so you can upgrade wheezy and fix systemd error :( | ||
- | | + | FIX for download: Original keyserver is broken, add --keyserver hkp:// |
+ | |||
+ | | ||
# error no jessie: | # error no jessie: | ||
- | lxc-create -B btrfs -n websrv -t download -- -d debian -r jessie -a amd64 | + | lxc-create -B btrfs -n websrv -t download -- -d debian -r jessie -a amd64 --keyserver hkp:// |
# error not working with unprivileged | # error not working with unprivileged | ||
- | LANG=C SUITE=jessie MIRROR=http:// | + | LANG=C SUITE=jessie MIRROR=http:// |