[libvirt] [PATCHv2 0/4] Filesystem limits for containers

Guido Günther agx at sigxcpu.org
Fri May 11 21:14:08 UTC 2012


Hi,
the following patches are a second stab at filesystem limits for
containers. With these patches space limits in openvz containers are
printed in the domain config as:

<filesystem type='template' accessmode='passthrough'>
      <source name='debian'/>
      <target dir='/'/>
      <space_hard_limit unit="MiB">1153024</space_hard_limit>
      <space_soft_limit unit="MiB">1048576</space_soft_limit>
</filesystem>

The can also be set from the domain xml. I left out inode limits for now
since the unit "Bytes" wouldn't fit there well and I didnt' get around
to update the unit parsing code yet. Changes since last time:

* Leave out inode handling for now
* Prefix space limits with space_ - I picked that instead of size since
  "df" talks about space as well and OpenVZ terms the variable
  diskspace
* Document details about hard and soft limits.
* Update schema
* Also set quota when reading domain xml

This isn't meant for 0.9.12.

Guido Günther (4):
  Introduce filesystem limits to virDomainFSDef
  openvz: support file system quota reporting
  openvz: add quota argument when creating container
  Use virParseScaledValue in virDomainParseMemory

 docs/formatdomain.html.in                       |   12 +++
 docs/schemas/domaincommon.rng                   |   12 +++
 src/conf/domain_conf.c                          |  125 ++++++++++++++++-------
 src/conf/domain_conf.h                          |    2 +
 src/openvz/openvz_conf.c                        |   16 +++
 src/openvz/openvz_driver.c                      |   54 +++++++++-
 tests/domainschemadata/domain-openvz-simple.xml |    2 +
 7 files changed, 186 insertions(+), 37 deletions(-)

-- 
1.7.10




More information about the libvir-list mailing list