[Libvir] [RFC] Add Container support to libvirt

Vivek Kashyap kashyapv at us.ibm.com
Thu Jan 17 07:25:03 UTC 2008

On Thu, 17 Jan 2008, Shuveb Hussain wrote:

> On Jan 17, 2008 2:30 AM, Dan Smith <danms at us.ibm.com> wrote:
>> DL>       <network>
>> DL>           <ipaddress></ipaddress>
>> DL>           <hostname>browndog</hostname>
>> DL>           <gateway></gateway>
>> DL>           <nameserver></nameserver>
>> DL>           <netmask></netmask>
>> DL>       </network>
>> This is me showing my complete ignorance here, but can you enforce the
>> hostname inside a container like that?  I would expect that to be done
>> by the init scripts inside a container, much like a real machine.
> It is most flexible to manage virtual machines from the base machine
> on which they run. The idea is to run an agent on the base machine
> alone that is able to configure all virtual machines without the need
> to have agents inside of each of the virtual machines. When an OpenVZ
> VPS is being created, the tools actually set /etc/resolv.conf and also

Containers  would similarly be managed from the init namespace.

[On 2.6.24 kernel ensure you have cgroup and controllers support
included - CGROUP_* set of config options. Then mount as follows -

mount -t cgroup -o ns none /containers]

If a Container is clone()ed now it will automatically show up in
/containers as node_<pid> of the child. One can then rename this to the
desired name as well as pass the desired hostname as part of the
configuration for the Container wherein its init task/script can set the 

Am I understanding and correlating the above correctly to what you
mention wrt OpenVZ?


> its IP address from its configuration file. In containers, there are
> no tools that do it (yet). As of now, I am too wondering how the
> network configuration values in the config are going to be applied to
> the virtual machine. If it were like a real virtual machine, then
> these things get set from the machine's init script itself, like you
> said.
> Thanks,
> -- 
> Shuveb Hussain
> B I N A R Y K A R M A
> Chennai, India.
> Phone : +91 44-64621656
> Mobile: +91 98403-80386
> http://www.binarykarma.com
> --
> Libvir-list mailing list
> Libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list


Vivek Kashyap
Linux Technology Center, IBM

More information about the libvir-list mailing list