Add XML config for resource partitions

Allow VMs to be placed into resource groups using the
following syntax

  <resource>
    <partition>/virtualmachines/production</partition>
  </resource>

A resource cgroup will be backed by some hypervisor specific
functionality, such as cgroups with KVM/LXC.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange
2013-03-21 11:28:10 +00:00
parent aa8604dd45
commit 8d4adf3efa
5 changed files with 128 additions and 0 deletions

View File

@@ -716,6 +716,35 @@
</dl>
<h3><a name="resPartition">Resource partitioning</a></h3>
<p>
Hypervisors may allow for virtual machines to be placed into
resource partitions, potentially with nesting of said partitions.
The <code>resource</code> element groups together configuration
related to resource partitioning. It currently supports a child
element <code>partition</code> whose content defines the path
of the resource partition in which to place the domain. If no
partition is listed, then the domain will be placed in a default
partition. It is the responsibility of the app/admin to ensure
that the partition exists prior to starting the guest. Only the
(hypervisor specific) default partition can be assumed to exist
by default.
</p>
<pre>
...
&lt;resource&gt;
&lt;partition&gt;/virtualmachines/production&lt;/partition&gt;
&lt;/resource&gt;
...
</pre>
<p>
Resource partitions are currently supported by the QEMU and
LXC drivers, which map partition paths onto cgroups directories,
in all mounted controllers. <span class="since">Since 1.0.5</span>
</p>
<h3><a name="elementsCPU">CPU model and topology</a></h3>
<p>

View File

@@ -537,6 +537,10 @@
<optional>
<ref name="numatune"/>
</optional>
<optional>
<ref name="respartition"/>
</optional>
</interleave>
</define>
@@ -680,6 +684,14 @@
</element>
</define>
<define name="respartition">
<element name="resource">
<element name="partition">
<ref name="absFilePath"/>
</element>
</element>
</define>
<define name="clock">
<optional>
<element name="clock">