CLI: LXD 4 resource limits Command Line Interface reference
Resource limits: Show configuration
# Show default profile for all VMs
# lxc profile list
# Show configuration for the default profile
# lxc profile show default
Storage space
List available LXD storage space
Use lxc storage list to show the used storage name(f.e. “default”).
# lxc storage info default
Resource limits: Hard disk space
Limit maximum total disk space allocation for all VMs up to 20 GB:
# lxc profile device set default root size 20GB
Resource limits: Hard disk space
Limit maximum total disk space allocation for one VM:
# lxc config device set $vmnmae root size 20GB
Resource limits: CPU
Limit CPU usage for all VMs:
# lxc profile set default limits.cpu.allowance 25ms/200ms
Resource limits: CPU
Limit CPU usage for one specific VM:
# lxc config set $vmname limits.cpu.allowance 25ms/200ms
Resource limits: RAM
Limit RAM usage for all VMs:
# lxc profile set default limits.memory 1024MB
Resource limits: RAM
Limit RAM usage for one specific VM:
# lxc config set $vmname limits.memory 1024MB
More detailed instructions can be found here: Stgrabers LXD blog
More posts