Hi, I've been trying to get an unprivileged Fedora 29 LXD container safe to use on my workplace's media server (which is the base system of Ubuntu 18.04-1) but am having absolutely zero luck with fixing one up. I've placed values in my /etc/sub{u,g}id files that are the same for both lxd and root and identical across those files,
Code:
lxd:231072:65536
root:231072:65536
... my container's root filesystem is set to those values, and I've tried "lxc config set <container name> security.privileged false" as well as "lxc profile edit default security.privileged false" --
However, I get "Failed to run /usr/lib/lxd/lxd forkstart cheerful-sturgeon /var/lib/lxd/containers /var/log/lxd/cheerful-sturgeon/lxc.conf. Try 'lxc info --show-log cheerful-sturgeon for more info." So I do that, and see:
Code:
Script exited with status 126
Failed to run mount hooks
Failed to set up container 'cheerful-sturgeon'
An error occurred in another process (expected sequence number 5)
Received container state "ABORTING" instead of "RUNNING"
Failed to spawn container "cheerful-sturgeon"
Connection reset by peer - Failed to receive response for command "get_state"
I did some digging on the web, saw that it might be related to AppArmor running at the same time, and then did "systemctl disable apparmor" and "/etc/init.d/apparmor teardown" to clear the profiles, making sure to restart LXD after. No worky.
Then, I set "raw.lxc: lxc.apparmor.profile=unconfined" in the container settings, followed by another restart. Still no worky.
Then I try to su to the lxd user (who is set up to have access to the lxd group) and start an unprivileged container that way. No workies again.
lxc set raw.idmap "both 231072 65536" where 231072 is the shared lxd/root uid that should be mapped to 0? No workies yet again, it says "Failed to get ID map: Host ID is in the range of subids."
I don't know what to do short of make a sacrifice to Beelzebub, because using a privileged container is completely out of the question for my purposes. I'm hoping someone here can help, I'll be grateful.
Will post my lxc.conf file once I get back to the office.