I was trying to limit a container ingress as described from this external resource here:
lxc config device set mycontainer1 eth0 limits.ingress 1Mbit
Error: Device from profile(s) cannot be modified for individual instance. Override device or modify profile instead
Whats the proper way to rate-limit ingress and egress for my running container. This is related to the question here: Find network usage for a container
You can set both via the initial override command. But after the device is overridden (copied from the profile into the instance) you then need to use the “set” command.
Thanx for all the help @tomp ! This is what I ultimately did to limit networking capacity on LXD containers, as a reference for others. (Here is a link to the references on available limits for networking)
First, I investigate the individual container. Note the “-e” which is needed to see any settings derived from the profiles as they are not shown otherwise:
lxc config show -e mycontainer
If you need to modify the individual container, this is done in two steps. In the example below, we limit the container to 1Mbit both upload & download:
How would I enforce this also for “sub-projects”? I mean, is there a hierarchy to how these settings can be enforced so to protect the network from overload?
So, this would be needed to be set on all projects? How does an admin then enforce it for multiple clients using the same lxd-instance/cluster? I mean, it would be trivial to take down a complete environment just consuming all network capacity for any project.