[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libvir] [RFC] 0/3 Add Linux Container support to libvirt



The following set of patches add the first batch of linux container support to libvirt. The work is not complete but I wanted to start getting some of this out for comments. This set of patches supports the following:

* new switch --with-lxc to enable linux container support (off by default)
* virConnectOpen
* virConnectClose
* virConnectListDomains (of course none are listed since we can't start the containers yet)
* virConnectNumOfDomains
* virConnectListDefinedDomains
* virConnectNumOfDefinedDomains
* virDomainLookupByUUID
* virDomainLookupByName
* virDomainGetInfo
* virDomainGetXMLDesc
* virDomainDefineXML
* virDomainUndefine

A sample XML format that can be used to define a linux container domain:
<domain type='linuxcontainer'>
   <name>TestContainer3</name>
   <container>
       <filesystem type='mount'>
           <source dir='/home/user/lxc_files/etc/'/>
           <target dir='/etc/'/>
       </filesystem>
       <filesystem type='mount'>
           <source dir='/home/user/lxc_files/var/'/>
           <target dir='/var/'/>
       </filesystem>
       <init>/usr/sbin/container_init</init>
   </container>
   <memory>65536</memory>
   <devices>
       <console tty='/dev/pts/4'/>
   </devices>
</domain>

I've left out the network definition as I'll be tackling that a little later on...

I'm currently working on starting a container.

Any and all questions and comments are welcome.

Thanks!

--
Best Regards,
Dave Leskovec
IBM Linux Technology Center
Open Virtualization


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]