[libvirt] [sandbox 1/6] Pass debug and verbose values to init

Daniel P. Berrange berrange at redhat.com
Tue Dec 5 16:52:41 UTC 2017

On Tue, Dec 05, 2017 at 10:53:17AM +0100, Cédric Bosdonnat wrote:
> libvirt-sandbox-init-common is expecting -d and -v parameters to
> set it in debug or verbose mode... but those will never be passed
> by the launcher program.

Hmm, libvirt-sandbox-init-{qemu,lxc} both know how to pass -d
to init-common.  If either of the virt specific init programs
are in debug mode (as indicated by the word "debug" in kernel
command line or equiv), then they pass -d to init-common.

You're right that there's no way to pass -v though.

Also, it might be useful to run init-common in debug mode
without the virt specific init being in debug mode, to avoid
drowning in debug.

> Writing the core.debug and core.verbose parameters in the sandbox
> configuration makes those values actually usable from the init.
> ---
>  bin/virt-sandbox.c                            |  3 ++
>  libvirt-sandbox/libvirt-sandbox-config.c      | 75 +++++++++++++++++++++++++++
>  libvirt-sandbox/libvirt-sandbox-config.h      |  6 +++
>  libvirt-sandbox/libvirt-sandbox-init-common.c |  3 ++
>  libvirt-sandbox/libvirt-sandbox.sym           |  4 ++
>  5 files changed, 91 insertions(+)

Reviewed-by: Daniel P. Berrange <berrange at redhat.com>

if the commit message is fixed

|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

More information about the libvir-list mailing list