Skip to main content

krun_set_kernel

Function krun_set_kernel 

Source
pub unsafe extern "C" fn krun_set_kernel(
    ctx_id: u32,
    kernel_path: *const c_char,
    kernel_format: u32,
    initramfs: *const c_char,
    cmdline: *const c_char,
) -> i32
Expand description

Sets the path to the kernel to be loaded in the microVM.

Arguments: “ctx_id” - the configuration context ID. “kernel_path” - the path to the kernel, relative to the host’s filesystem. “kernel_format” - the kernel format. “initramfs” - the path to the initramfs, relative to the host’s filesystem. “cmdline” - the kernel command line.

Returns: Zero on success or a negative error number on failure.