Questions about LXD support

Hi,

I was reading documentation and I was wondering why LXD nodes have to be based on Ubuntu >= 18.04 in particular ? Is there any way to use LXD with debian-based hosts ? Because LXD can be set up on Debian hosts with snapd.

Regards,

Hi @bronis75

For the 5.8.x version there is support for 1604, 1804 and 1810. See the installation note. On 5.10 there will be packages for debian10 and 1904 through snapd.

Thank you for your answer. Just out of curiosity, what is the reason that explains that it only supports Ubuntu hosts currently , is it because of LXD drivers that are different ?

Regards,

Because on 5.8.x it only supports Ubuntu. There is no package for Debian9 and Debian10 isn’t supported OpenNebula-wise on 5.8. The 5.10 doc will be uptaded.

1 Like

Thank you !

Running LXD on Ubuntu 16.04 with 4GB RAM and 8GB swap partition. I have a container running a service that sometimes likes to eat up a fair amount of RAM. However, it’s all background work so I don’t care how long it takes. Because of my limited amount of RAM, I’d like for the container to start swapping out well before the system’s full 4GB is in use. Ideally it would start swapping out above about 512MB.

However, I’ve noticed that setting the limits.memory setting affects the total amount of RAM+swap. So I can set the limit at 5GB and the container will see 4GB RAM + 1GB swap. I can also set it to 512MB and the container will see 512MB RAM + 0 swap.

Is there any way in LXD to limit the RAM down to 512MB, but still allow access to swap?

I have GRUB_CMDLINE_LINUX_DEFAULT=“swapaccount=1” in GRUB’s config, but I don’t think that’s directly related to my issue. I’ve also played around with limits.memory.* settings, none of which seem to achieve what I want.

There seems to be limits.memory.swap.priority and limits.memory.swap but I haven’t tested it yet. Could you give it a try since you have the actual need and can confirm if it suits your case. If it works could you open a feature request ? Also we currently support passing raw config to the LXD container .