I’m really stuck here and hoping someone can help me out as I’m new to LXD and probably missing something blindingly obvious!
I’ve managed to build myself a shiny new Ubuntu 18.04-LTS system using ZFS on LUKS for the root filesystem but when I try to ‘lxc launch’ something it just downloads the image and then fails.
I configured LXD INIT to use a ZFS dataset (rather than a new pool) called rpool/lxd, which it duly created:
# zfs list NAME USED AVAIL REFER MOUNTPOINT rpool 2.62G 7.65T 140K / rpool/ROOT 2.05G 7.65T 140K none rpool/ROOT/ubuntu 2.05G 2.95G 1.81G / rpool/home 18.7M 4.98G 18.4M /home rpool/home/root 273K 4.98G 273K /root rpool/lxd 441M 500G 140K none rpool/lxd/containers 11.7M 500G 140K none rpool/lxd/custom 140K 500G 140K none rpool/lxd/deleted 140K 500G 140K none rpool/lxd/images 429M 500G 140K none rpool/lxd/snapshots 140K 500G 140K none rpool/var 117M 4.89G 140K /var rpool/var/cache 105M 4.89G 105M /var/cache rpool/var/log 11.3M 4.89G 11.3M legacy rpool/var/nfs 140K 4.89G 140K /var/lib/nfs rpool/var/spool 198K 4.89G 198K /var/spool rpool/var/tmp 174K 4.89G 174K legacy
And then I try to launch a new container:
# lxc launch ubuntu:xenial MyFirstContainer Creating MyFirstContainer Starting MyFirstContainer Error: Failed to run: /usr/lib/lxd/lxd forkstart MyFirstContainer /var/lib/lxd/containers /var/log/lxd/MyFirstContainer/lxc.conf: Try `lxc info --show-log local:MyFirstContainer` for more info
Using the suggested lxc info command I get:
Name: MyFirstContainer Remote: unix:// Architecture: x86_64 Created: 2018/06/11 22:34 UTC Status: Stopped Type: persistent Profiles: default Log: lxc 20180611223503.982 ERROR lxc_lsm - lsm/lsm.c:lsm_process_label_set_at:167 - No such file or directory - Failed to set AppArmor label "lxc-container-default-cgns" lxc 20180611223503.982 ERROR lxc_apparmor - lsm/apparmor.c:apparmor_process_label_set:243 - No such file or directory - Failed to change apparmor profile to lxc-container-default-cgns lxc 20180611223503.982 ERROR lxc_sync - sync.c:__sync_wait:57 - An error occurred in another process (expected sequence number 5) lxc 20180611223504.219 ERROR lxc_container - lxccontainer.c:wait_on_daemonized_start:824 - Received container state "ABORTING" instead of "RUNNING" lxc 20180611223504.219 ERROR lxc_start - start.c:__lxc_start:1866 - Failed to spawn container "MyFirstContainer" lxc 20180611223504.298 WARN lxc_commands - commands.c:lxc_cmd_rsp_recv:130 - Connection reset by peer - Failed to receive response for command "get_cgroup"
Whilst I’m not new to Linux or ZFS, I nearly always use RHEL/CentOS and so I am new to AppArmor and LXD; is this is an AppArmor issue I’m seeing here or something else?
It looks like the launch command is creating the required ZFS datasets but since I’m new to this I don’t know if this looks the way it should!
# zfs list | grep lxd rpool/lxd 441M 500G 140K none rpool/lxd/containers 11.7M 500G 140K none rpool/lxd/containers/MyFirstContainer 11.5M 500G 429M /var/lib/lxd/storage-pools/lxd/containers/MyFirstContainer rpool/lxd/custom 140K 500G 140K none rpool/lxd/deleted 140K 500G 140K none rpool/lxd/images 429M 500G 140K none rpool/lxd/images/08bbf441bb737097586e9f313b239cecbba96222e58457881b3718c45c17e074 428M 500G 428M none rpool/lxd/snapshots 140K 500G 140K none
Can anyone provide me with any pointers where to look? I’m so near, yet so far!