First I just want to say thank you to everyone here, especially Stefan for all of your diligent work on both LXD as well as supporting it for the rest of us. I’ve found this site to be extremely important to understanding and working with LXD.
I have set my default profile as such:
lxc profile show default
raw.lxc: “lxc.apparmor.profile=unconfined\nlxc.cap.drop= \nlxc.cgroup.devices.allow=a\nlxc.mount.auto=proc:rw
description: Default LXD profile
I’m having problems running docker containers in privileged mode inside lxd containers AND Virtual Machines. The latter was a bit of a surprise to me as I thought perhaps there was just an issue with containers within containers.
For Instance, I can run this command in a VMWare VM without an issue
sudo docker run -d --restart=unless-stopped -p 80:80 -p 443:443 --privileged rancher/rancher
The service starts without an issue.
If I run it in a lxd container or in a virtual machine I get:
> ERROR: Rancher must be ran with the --privileged flag when running outside of Kubernetes
I’ll admit I’ve had issues with formatting the appropriate profile parameters and had a lot of confusion between the documentation for various versions of LXD as it pertains to raw.lxc.
I’m running lxd 4.18 on Ubuntu 20.04 latest patching applied.
If someone could guide me on this issue, I’d be very grateful…