Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockDevParams ¶
type ExecArgs ¶
type ExecArgs struct {
ContainerID string // The container ID
Environment []string // The environment variables of the monitor
Command string // The unikernel's command line
Seccomp bool // Enable or disable seccomp filters for the VMM
MemSizeB uint64 // The size of the memory provided to the VM in bytes
VCPUs uint // The number of vCPUs to allocate
UnikernelPath string // The path of the unikernel inside rootfs
InitrdPath string // The path to the initrd of the unikernel
VAccelType string // Specifies the vAccel acceleration type(e.g. vsock). When empty, vAccel is disabled
VSockDevPath string // The directory inside the monitor rootfs with the vAccel unix sockets
VSockDevID int // The guest-cid
Net NetDevParams
}
ExecArgs holds the data required by Execve to start the VMM FIXME: add extra fields if required by additional VMM's
type ExtraBinConfig ¶
type ExtraBinConfig struct {
Path string `toml:"path"` // The path to the binary
Options string `toml:"options,omitempty"` // Optional cli options for the extra binary
}
ExtraBinConfig struct is used to hold specific configuration for extra binaries like virtiofsd. It is parsed from the urunc config file or state.json annotations
type MonitorBlockArgs ¶
type MonitorCliArgs ¶
type MonitorConfig ¶
type MonitorConfig struct {
DefaultMemoryMB uint `toml:"default_memory_mb"`
DefaultVCPUs uint `toml:"default_vcpus"`
BinaryPath string `toml:"path,omitempty"` // Optional path to the hypervisor binary
DataPath string `toml:"data_path,omitempty"` // Optional path to the hypervisor data files (e.g. qemu bios stuff)
Vhost bool `toml:"vhost,omitempty"` // Optional: enable vhost for network performance optimization
}
MonitorConfig struct is used to hold hypervisor specific configuration that is parsed from the urunc config file or state.json annotations
type NetDevParams ¶
type ProcessConfig ¶
type ProcessConfig struct {
UID uint32 // The uid of the process inside the guest
GID uint32 // The gid of the process inside the guest
WorkDir string // The workdir of the process inside the guest
}
Specific to Linux
type RootfsParams ¶
type SharedfsParams ¶
type SharedfsParams struct {
}
type Unikernel ¶
type Unikernel interface {
Init(UnikernelParams) error
CommandString() (string, error)
SupportsBlock() bool
SupportsFS(string) bool
MonitorNetCli(string, string) []string
MonitorBlockCli() []MonitorBlockArgs
MonitorCli() MonitorCliArgs
}
type UnikernelParams ¶
type UnikernelParams struct {
CmdLine []string // The cmdline provided by the image
EnvVars []string // The environment variables provided by the image
Monitor string // The monitor where guest will execute
Version string // The version of the unikernel
InitrdPath string // The path to the initrd of the unikernel
NetDevName string // The name of the guest network device declared at build time
BlkDevName string // The name of the guest block device declared at build time
Net NetDevParams
Block []BlockDevParams
Rootfs RootfsParams // Information about rootfs
ProcConf ProcessConfig // Information for the process execution inside the guest
}
UnikernelParams holds the data required by the unikernels commandline
type VMM ¶
type VMM interface {
// BuildExecCmd builds and validates the VMM command arguments without executing.
// This is used to verify the command can be built before reporting container as started.
// The returned slice contains the command path as the first element followed by arguments.
BuildExecCmd(args ExecArgs, ukernel Unikernel) ([]string, error)
// PreExec performs any monitor-specific setup that must happen after BuildExecCmd
// succeeds but before syscall.Exec is called. For example, HVT applies seccomp
// filters here. Most monitors can return nil (no-op).
PreExec(args ExecArgs) error
Stop(int) error
Signal(int, unix.Signal) error
Path() string
UsesKVM() bool
Ok() error
}
Click to show internal directories.
Click to hide internal directories.