]> xenbits.xensource.com Git - libvirt.git/commit
Introduce new domain create APIs to pass pre-opened FDs to LXC
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 9 Jul 2013 16:12:38 +0000 (17:12 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 18 Jul 2013 10:01:14 +0000 (11:01 +0100)
commitd76227bea35cc49374a94414f6d46e3493ac2a52
treecb037c23035f45629e1e1e72bdbc004978618533
parentd9301a9ae39e797dceb608fdd3f3f0902acc5d4c
Introduce new domain create APIs to pass pre-opened FDs to LXC

With container based virt, it is useful to be able to pass
pre-opened file descriptors to the container init process.
This allows for containers to be auto-activated from incoming
socket connections, passing the active socket into the container.

To do this, introduce a pair of new APIs, virDomainCreateXMLWithFiles
and virDomainCreateWithFiles, which accept an array of file
descriptors. For the LXC driver, UNIX file descriptor passing
will be used to send them to libvirtd, which will them pass
them down to libvirt_lxc, which will then pass them to the container
init process.

This will only be implemented for LXC right now, but the design
is generic enough it could work with other hypervisors, hence
I suggest adding this to libvirt.so, rather than libvirt-lxc.so

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
include/libvirt/libvirt.h.in
python/generator.py
python/libvirt-override-virConnect.py
python/libvirt-override-virDomain.py
python/libvirt-override.c
src/driver.h
src/libvirt.c
src/libvirt_public.syms