mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
LXC: added some doc on domxml-from-native with mention of limitations
This commit is contained in:
parent
a09bbc024d
commit
f4b28d5c8a
@ -555,7 +555,7 @@ and LXC. For further details about usage of virsh consult its
|
|||||||
manual page.
|
manual page.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h3><a name="usageSave">Defining (saving) container configuration></a></h3>
|
<h3><a name="usageSave">Defining (saving) container configuration</a></h3>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The <code>virsh define</code> command takes an XML configuration
|
The <code>virsh define</code> command takes an XML configuration
|
||||||
@ -702,5 +702,37 @@ host
|
|||||||
# virt-top -c lxc:///
|
# virt-top -c lxc:///
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
<h3><a name="usageConvert">Converting LXC container configuration</a></h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The <code>virsh domxml-from-native</code> command can be used to convert
|
||||||
|
most of the LXC container configuration into a domain XML fragment
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
# virsh -c lxc:/// domxml-from-native lxc-tools /var/lib/lxc/myguest/config
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
This conversion has some limitations due to the fact that the
|
||||||
|
domxml-from-native command output has to be independent of the host. Here
|
||||||
|
are a few things to take care of before converting:
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
Replace the fstab file referenced by <tt>lxc.mount</tt> by the corresponding
|
||||||
|
lxc.mount.entry lines.
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
Replace all relative sizes of tmpfs mount entries to absolute sizes. Also
|
||||||
|
make sure that tmpfs entries all have a size option (default is 50%).
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
Define <tt>lxc.cgroup.memory.limit_in_bytes</tt> to properly limit the memory
|
||||||
|
available to the container. The conversion will use 64MiB as the default.
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user