rumpkernel/rumprun-xen — pull request #12 by mato (2014-11-13 11:03:28+00:00)
Title: Configure rumprun-xen application stacks from Xenstore

*** Mailing list thread on rumpkernel-users forthcoming, please comment there rather than here ***

In order to run rumprun-xen applications that are actually useful, we
need to be able to configure block devices and network interfaces.
These changes implement a basic mechanism to do this using Xenstore.

Conceptually the changes consist of the following parts which work
together:

- The rumpconfig module provides _rumprun_config() and
_rumprun_deconfig() functions. These are called before and after the
application main() function, and also in the case of deconfig when
_exit() is called.

- These functions rely on keys like the following being present in
Xenstore at the time the domain is started:

/local/domain//rumprun/net/0/... (first network interface)
/local/domain//rumprun/net/1/... (second network interface)
/local/domain//rumprun/blk/0/... (first block device)
/local/domain//rumprun/blk/1/... (second block device)

- The "xr" driver script, currently located in app-tools/. The
motivation for this script is twofold:

Firstly, in order to write the configuration to Xenstore the domain
must be created in a paused state so that we can retrieve its unique
. Only then do we know where in Xenstore to write the
configuration data.

Secondly, it is my intention with this work to provide a
"docker-alike" interface for running rumprun applications. The "xr"
script is therefore the CLI for running such applications.

Note that in this initial version, only configuring IPv4 network
interfaces with DHCP is supported, and only using image files with ffs
or cd9660 filesystems for block devices is supported.

Signed-off-by: Martin Lucina