Enable core dump in lxd container

I have configured the limits in the pam settings in pam.d and the /etc/security/limits.conf, and also tried the /etc/systemd/user.conf and /etc/systemd/system.conf. I turned debug on in the pam configuration, and can see that the process is trying to set the limit, but fails with the message I included in my last post:

ualpha01 sudo: pam_limits(sudo:session): Could not set limit for 'core' to soft=8388608, hard=8388608: Operation not permitted; uid=0,euid=0