Я пробую lxc впервые следующим https://help.ubuntu.com/lts/serverguide/lxc.html и страницами справочника.
lxc-create
управляйте выполнениями без ошибок, и создает zfs /lxc/u1
файловая система, смонтированная на /lxc/u1/rootfs
.
root@Ubuntu-1604-xenial-64-minimal ~ # lxc-create -t download --bdev zfs --lxcpath=/lxc -n u1 -- --dist ubuntu --release xenial --arch amd64
Setting up the GPG keyring
Downloading the image index
Downloading the rootfs
Downloading the metadata
The image cache is now ready
Unpacking the rootfs
---
You just created an Ubuntu container (release=xenial, arch=amd64, variant=default)
To enable sshd, run: apt-get install openssh-server
For security reason, container images ship without user accounts
and without a root password.
Use lxc-attach or chroot directly into the rootfs to set a root password
or create user accounts.
root@Ubuntu-1604-xenial-64-minimal ~ # lxc-ls --fancy
root@Ubuntu-1604-xenial-64-minimal ~ # zfs list
NAME USED AVAIL REFER MOUNTPOINT
lxc 390M 1.27T 20K /lxc
lxc/u1 389M 1.27T 389M /lxc/u1/rootfs
root@Ubuntu-1604-xenial-64-minimal ~ #
Почему делает lxc-ls
не показывают u1
?
Что я сделал неправильно?
Я должен добавить - lxcpath =/lxc к каждый lxc команда :(
root@Ubuntu-1604-xenial-64-minimal ~ # sudo lxc-ls --lxcpath=/lxc --fancy
NAME STATE AUTOSTART GROUPS IPV4 IPV6
u1 STOPPED 0 - - -
, с которой я зафиксировал это:
echo "lxc.lxcpath = /lxc" > /etc/lxc/lxc.conf