[libvirt] [PATCH] domain: Require <init> for container guests

Eric Blake eblake at redhat.com
Thu May 12 23:06:41 UTC 2011


On 05/12/2011 03:47 PM, Cole Robinson wrote:
> 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>)
> 
> Signed-off-by: Cole Robinson <crobinso at redhat.com>
> ---
>  src/conf/capabilities.h    |    1 +
>  src/conf/domain_conf.c     |   12 ++++++++++++
>  src/openvz/openvz_conf.c   |    4 +++-
>  src/openvz/openvz_driver.c |   14 --------------
>  4 files changed, 16 insertions(+), 15 deletions(-)
> 

ACK.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110512/d3a759a4/attachment-0001.sig>


More information about the libvir-list mailing list