Increase the disk space of a container

While initializing lxd init I had set my disk-space for zfs filesystem as 100GB. Now whenever I create my a new conainer…they all take the sapace of 100GB. I want to increase the size of a individual container.
Is it possible to do?
How do I do it?


By default the new container has no limit and if you do df -h inside the container you’'ll see all free space in the storage backend. I think you want to limit the resources and you can do it, for example, using profiles:

$ lxc profile create limites
$ lxc profile edit limites
limits.cpu: "1"
limits.cpu.allowance: 30%
limits.memory: 300MB
description: Perfil con limites
   path: /
   pool: default
   type: disk
   size: 12GB
name: limites
used_by: []
$ lxc launch ubuntu:x container00 -p default -p limites

In this example, the container can use 1 cpu (máx 30%), RAM max 300 MB and 12GB for the hard disk.
Look at lxc profile add and lxc profile assign in order to add/assign profiles to the conainers.
More info:


1 Like