GVirSandboxConfigInitrd

GVirSandboxConfigInitrd — Kernel ramdisk configuration details

Synopsis

#include <libvirt-sandbox/libvirt-sandbox.h>

#define             GVIR_SANDBOX_TYPE_CONFIG_INITRD_HANDLE
struct              GVirSandboxConfigInitrd;
struct              GVirSandboxConfigInitrdClass;
GVirSandboxConfigInitrd * gvir_sandbox_config_initrd_new
                                                        (void);
void                gvir_sandbox_config_initrd_set_kver (GVirSandboxConfigInitrd *config,
                                                         const gchar *version);
const gchar *       gvir_sandbox_config_initrd_get_kver (GVirSandboxConfigInitrd *config);
void                gvir_sandbox_config_initrd_set_kmoddir
                                                        (GVirSandboxConfigInitrd *config,
                                                         const gchar *kmoddir);
const gchar *       gvir_sandbox_config_initrd_get_kmoddir
                                                        (GVirSandboxConfigInitrd *config);
void                gvir_sandbox_config_initrd_set_init (GVirSandboxConfigInitrd *config,
                                                         const gchar *hostpath);
const gchar *       gvir_sandbox_config_initrd_get_init (GVirSandboxConfigInitrd *config);
void                gvir_sandbox_config_initrd_add_module
                                                        (GVirSandboxConfigInitrd *config,
                                                         const gchar *modname);
GList *             gvir_sandbox_config_initrd_get_modules
                                                        (GVirSandboxConfigInitrd *config);

Object Hierarchy

  GObject
   +----GVirSandboxConfigInitrd

Properties

  "init"                     gchar*                : Read / Write
  "kmoddir"                  gchar*                : Read / Write
  "kver"                     gchar*                : Read / Write

Description

Provides an object to store information about a kernel ramdisk

The GVirSandboxConfigInitrd object stores the information required to build a kernel ramdisk to use when booting a virtual machine as a sandbox.

Details

GVIR_SANDBOX_TYPE_CONFIG_INITRD_HANDLE

#define GVIR_SANDBOX_TYPE_CONFIG_INITRD_HANDLE      (gvir_sandbox_config_initrd_handle_get_type ())

struct GVirSandboxConfigInitrd

struct GVirSandboxConfigInitrd;

struct GVirSandboxConfigInitrdClass

struct GVirSandboxConfigInitrdClass {
    GObjectClass parent_class;

    gpointer padding[LIBVIRT_SANDBOX_CLASS_PADDING];
};

gvir_sandbox_config_initrd_new ()

GVirSandboxConfigInitrd * gvir_sandbox_config_initrd_new
                                                        (void);

Create a new initrd config

Returns :

a new sandbox initrd object. [transfer full]

gvir_sandbox_config_initrd_set_kver ()

void                gvir_sandbox_config_initrd_set_kver (GVirSandboxConfigInitrd *config,
                                                         const gchar *version);

Sets the host kernel version to use for populating the initrd with modules. This defaults to the currently running kernel version

config :

the sandbox initrd config. [transfer none]

version :

the kernel version. [transfer none]

gvir_sandbox_config_initrd_get_kver ()

const gchar *       gvir_sandbox_config_initrd_get_kver (GVirSandboxConfigInitrd *config);

Retrieves the path of the kver binary

config :

the sandbox initrd config. [transfer none]

Returns :

the kver binary path. [transfer none]

gvir_sandbox_config_initrd_set_kmoddir ()

void                gvir_sandbox_config_initrd_set_kmoddir
                                                        (GVirSandboxConfigInitrd *config,
                                                         const gchar *kmoddir);

Sets the full path to where the kernel modules will be looked up

config :

the sandbox initrd config. [transfer none]

kmoddir :

the full path to the kernel modules directory. [transfer none]

gvir_sandbox_config_initrd_get_kmoddir ()

const gchar *       gvir_sandbox_config_initrd_get_kmoddir
                                                        (GVirSandboxConfigInitrd *config);

Retrieves the current kernel modules directory

config :

the full path to the kernel modules directory. [transfer none]

Returns :

the full path to the kernel modules directory. [transfer none]

gvir_sandbox_config_initrd_set_init ()

void                gvir_sandbox_config_initrd_set_init (GVirSandboxConfigInitrd *config,
                                                         const gchar *hostpath);

Sets the host binary to be used as the init program inside the initrd. This defaults to /usr/bin/libvirt-sandbox-init-qemu

config :

the sandbox initrd config. [transfer none]

hostpath :

the init binary path. [transfer none]

gvir_sandbox_config_initrd_get_init ()

const gchar *       gvir_sandbox_config_initrd_get_init (GVirSandboxConfigInitrd *config);

Retrieves the path of the init binary

config :

the sandbox initrd config. [transfer none]

Returns :

the init binary path. [transfer none]

gvir_sandbox_config_initrd_add_module ()

void                gvir_sandbox_config_initrd_add_module
                                                        (GVirSandboxConfigInitrd *config,
                                                         const gchar *modname);

Request that the kernel module modname is included in the initrd, along with any depedent modules

config :

the sandbox initrd config. [transfer none]

modname :

the kernel module name. [transfer none]

gvir_sandbox_config_initrd_get_modules ()

GList *             gvir_sandbox_config_initrd_get_modules
                                                        (GVirSandboxConfigInitrd *config);

Retrieves the list of all modules

config :

the sandbox initrd config. [transfer none]

Returns :

the module names. [transfer container][element-type utf8]

Property Details

The "init" property

  "init"                     gchar*                : Read / Write

The host init path.

Default value: NULL


The "kmoddir" property

  "kmoddir"                  gchar*                : Read / Write

Kernel modules directory.

Default value: NULL


The "kver" property

  "kver"                     gchar*                : Read / Write

The host kernel version.

Default value: NULL