Trying to understand lxc-cgroups

I am new to containers and using debian buster. I have used VM with virsh for a while now. Today I basically followed this straight forward install for lxc, and everything seems to go well. The intro to cgroups link does not work, nor am I sure it would have given me what I’m looking for.

Unfortunately, it does not really talk about how to configure the containers resources. I’ve looked at man pages and had to search the internet just to get some commands like:


I can’t seem to find it will show all these commands I can play with. I did find this nice information here, but talks about settings using lxc config

‘lxc config’ does not work for me. Am I to assume this is in a Ubuntu env? Why can’t I use it? I have tried apt install lxc-client and its installed.

I have been able to use from the cli lxc.cgroup.cpuset.cpus and in the container’s config file. I would just like to know where else are all the other commands are?

Should I be using this approach, or figure out how to use lxc config?

I have finally found out how to limit lxc size using a different file system or backingstore.

man lxc-create

In options -B or --bdev explains how to use loop

lxc-create -B loop -t debian -n name --fssize=10G -- -r buster

That second link is to LXD documentation, not plain LXC, which is what the Debian wiki page is about.


yup, I figured that one out working on this on my second day. I was going to go the lxd route, but I do still enjoy virsh and lxc seems to do what I’m looking for right now.

Thanks for the input.

IF you have good resources for lxc however, please share. Like using -B loop with --fssize=10G, how can you enlarge the disk after? I will comment when I have time to find these out.