]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
domain: Require <init> for container guests
authorCole Robinson <crobinso@redhat.com>
Thu, 12 May 2011 20:12:05 +0000 (16:12 -0400)
committerCole Robinson <crobinso@redhat.com>
Fri, 13 May 2011 14:32:53 +0000 (10:32 -0400)
commit34639a3f6b3fb69e7dad858a471ccc80e41d2590
tree31372321ba276788597479f010b2abdd4500a955
parent0571c3afde30267536a80c0323efe3383e02cf37
domain: Require <init> for container guests

Use capabilities to allow a driver to register a default <init> if none
is specified in the XML. Openvz was already open-coding this to be /sbin/init

LXC currently falls over if no init is specified, so an explicit error is
an improvement IMO.

(Side note: I don't think we can set a default value for LXC. If we use
/sbin/init but the user doesn't specify a separate root FS for their guest,
the container will rerun the host's init which can be traumatic :). For
virt-install I'm thinking of defaulting to /sbin/init if a root FS has
been specified, otherwise require the user to manually specify <init>)
src/conf/capabilities.h
src/conf/domain_conf.c
src/openvz/openvz_conf.c
src/openvz/openvz_driver.c