I am using lxd 3.8 in debian 9 . as we have a lot of issues regarding "max open files " value. I am tried to set ulimit to 65535 But inside vm its not happening .In the host I have set to 65535 and it remain same after restarting the host . but inside vm staill the value is 1024 .
1024
If I am trying with ulimit -n command I am getting below error
bash: ulimit: open files: cannot modify limit: Operation not permitted
from your question it’s not clear if you used something like
lxc config set mycontainer limits.kernel.nofile (myvalue)
restarting the container after changing the value may help too.
works for me with lxd 3.13 and ubuntu 18.04
it should work as it was merged end of 2017 and lxd 3.8 released one year later. It probably means that your (hand compiled ?) debian 3.8 version is doing it wrong.
Well, if I had to solve this, that is, if I had a customer wanting to pay me for solving this problems (very low probability :-)) I’d first check if the client has been well and truly compiled against the same version as the server, and if yes, I’d install same Debian version in KVM, install snap and snap lxd, check that if works, if not whine on LXD github issues, if yes try to compare behaviour of snap (working) version and compiled (not working) version, while also browsing at the LXD sources to try to understand, searching for similar issues on the internet, until the reason becomes clear or blood spill from my eyes.
If you want to live with source, you have to realize you can if not actually die, have at least, painful experiences with it.
I don’t think you are right on this point. I routinely access my containers using ssh and have no problem with ulimit. Actually sometimes there are problems using ulimit as root in a container:
Anyway the OP says there are problems with using lxc config set, that’s before logging in the container.
is there any way to upgrade liblxc1 package in debian 9 ?
root@bla:~# lxc config set vmXXX limits.kernel.nofile 65535
error: Process limits require liblxc >= 2.1
That explains it. You don’t need to install debian 9 in a KVM using snap and check for differences, if you did you’d find that snap lxc packages a more recent liblxc library with it allowing for lxd to work fully including lxc config set … nofile without this kind of hassle.
Works for me with ubuntu 16.04 hosts (16.04 packages liblxc 2.0 in system (deb) libraries).
Without snap you have to compile liblxc and support security updates yourself. That’s life for people wanting to compile system tools