cloudhypervisor

package
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2024 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderName = "cloudhypervisor"
)

Variables

This section is empty.

Functions

func DefaultKernelCmdLine

func DefaultKernelCmdLine() config.KernelCmdLine

DefaultKernelCmdLine is the default recommended kernel parameter list.

console=ttyS0 [KLN] Output console device and options reboot=k [KNL] reboot_type=kbd panic=1 [KNL] Kernel behaviour on panic: delay <timeout>

timeout > 0: seconds before rebooting
timeout = 0: wait forever
timeout < 0: reboot immediately

i8042.noaux [HW] Don't check for auxiliary (== mouse) port i8042.nomux [HW] Don't check presence of an active multiplexing

controller

i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX

controllers

i8042.dumbkbd [HW] Pretend that controller can only read data from

keyboard and cannot control its state
(Don't attempt to blink the leds)

Read more: https://www.kernel.org/doc/html/v5.15/admin-guide/kernel-parameters.html

func New

func New(cfg *Config, networkSvc ports.NetworkService, ds ports.DiskService, fs afero.Fs) ports.MicroVMService

Types

type Config

type Config struct {
	// CloudHypervisorBin is the Cloud Hypervisor binary to use.
	CloudHypervisorBin string
	// StateRoot is the folder to store any required state (i.e. socks, pid, log files).
	StateRoot string
	// RunDetached indicates that the cloud hypervisor processes should be run detached (a.k.a daemon) from the parent process.
	RunDetached bool
	// DeleteVMTimeout is the timeout to wait for the microvm to be deleted.
	DeleteVMTimeout time.Duration
}

Config represents the configuration options for the Cloud Hypervisor infrastructure.

type State

type State interface {
	Root() string

	PID() (int, error)
	PIDPath() string
	SetPid(pid int) error

	LogPath() string
	StdoutPath() string
	StderrPath() string
	SockPath() string

	CloudInitImage() string
}

func NewState

func NewState(vmid models.VMID, stateDir string, fs afero.Fs) State

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL