libvirtlxcxml

lxc仅仅需要知道spawn作为容器的“init”函数(pid为1的进程)

例子

<domain type='lxc'>
  <name>helloworld</name>
  <memory>102400</memory>
  <os>
    <type>exe</type>
    <init>/bin/sh</init>
  </os>
  <devices>
    <console type = 'pty'/>
  </devices>
</domain>

原文地址:https://www.cnblogs.com/zhangzhang/p/2922342.html