hypervisors

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FirecrackerVmm    VmmType = "firecracker"
	FirecrackerBinary string  = "firecracker"
	FCJsonFilename    string  = "fc.json"
)
View Source
const (
	HvtVmm    VmmType = "hvt"
	HvtBinary string  = "solo5-hvt"
)
View Source
const (
	QemuVmm    VmmType = "qemu"
	QemuBinary string  = "qemu-system-"
)
View Source
const (
	SptVmm    VmmType = "spt"
	SptBinary string  = "solo5-spt"
)
View Source
const DefaultMemory uint64 = 256 // The default memory for every hypervisor: 256 MB

Variables

View Source
var ErrVMMNotInstalled = errors.New("vmm not found")

Functions

func BytesToStringMB

func BytesToStringMB(argMem uint64) string

func NewVMM

func NewVMM(vmmType VmmType, monitors map[string]types.MonitorConfig) (vmm types.VMM, err error)

Types

type Firecracker

type Firecracker struct {
	// contains filtered or unexported fields
}

func (*Firecracker) Execve

func (fc *Firecracker) Execve(args types.ExecArgs, ukernel types.Unikernel) error

func (*Firecracker) Ok

func (fc *Firecracker) Ok() error

func (*Firecracker) Path

func (fc *Firecracker) Path() string

func (*Firecracker) Stop

func (fc *Firecracker) Stop(pid int) error

func (*Firecracker) SupportsSharedfs

func (fc *Firecracker) SupportsSharedfs(_ string) bool

SupportsSharedfs returns a bool value depending on the monitor support for shared-fs

func (*Firecracker) UsesKVM

func (fc *Firecracker) UsesKVM() bool

type FirecrackerBootSource

type FirecrackerBootSource struct {
	ImagePath  string `json:"kernel_image_path"`
	BootArgs   string `json:"boot_args"`
	InitrdPath string `json:"initrd_path,omitempty"`
}

type FirecrackerConfig

type FirecrackerConfig struct {
	Source  FirecrackerBootSource `json:"boot-source"`
	Machine FirecrackerMachine    `json:"machine-config"`
	Drives  []FirecrackerDrive    `json:"drives"`
	NetIfs  []FirecrackerNet      `json:"network-interfaces"`
	VSock   FirecrackerVSockDev   `json:"vsock,omitempty"`
}

type FirecrackerDrive

type FirecrackerDrive struct {
	DriveID   string `json:"drive_id"`
	IsRO      bool   `json:"is_read_only"`
	IsRootDev bool   `json:"is_root_device"`
	HostPath  string `json:"path_on_host"`
}

type FirecrackerMachine

type FirecrackerMachine struct {
	VcpuCount       uint   `json:"vcpu_count"`
	MemSizeMiB      uint64 `json:"mem_size_mib"`
	Smt             bool   `json:"smt"`
	TrackDirtyPages bool   `json:"track_dirty_pages"`
}

type FirecrackerNet

type FirecrackerNet struct {
	IfaceID  string `json:"iface_id"`
	GuestMAC string `json:"guest_mac,omitempty"`
	HostIF   string `json:"host_dev_name"`
}

type FirecrackerVSockDev

type FirecrackerVSockDev struct {
	GuestCID int    `json:"guest_cid"`
	UDSPath  string `json:"uds_path"`
	VSockID  string `json:"vsock_id"`
}

type HVT

type HVT struct {
	// contains filtered or unexported fields
}

func (*HVT) Execve

func (h *HVT) Execve(args types.ExecArgs, ukernel types.Unikernel) error

func (*HVT) Ok

func (h *HVT) Ok() error

Ok checks if the hvt binary is available in the system's PATH.

func (*HVT) Path

func (h *HVT) Path() string

Path returns the path to the hvt binary.

func (*HVT) Stop

func (h *HVT) Stop(pid int) error

Stop kills the hvt process

func (*HVT) SupportsSharedfs

func (h *HVT) SupportsSharedfs(_ string) bool

SupportsSharedfs returns a bool value depending on the monitor support for shared-fs

func (*HVT) UsesKVM

func (h *HVT) UsesKVM() bool

UsesKVM returns a bool value depending on if the monitor uses KVM

type Hedge

type Hedge struct{}

func (*Hedge) Execve

func (h *Hedge) Execve(_ types.ExecArgs, _ types.Unikernel) error

func (*Hedge) Ok

func (h *Hedge) Ok() error

func (*Hedge) Path

func (h *Hedge) Path() string

func (*Hedge) Stop

func (h *Hedge) Stop(_ int) error

func (*Hedge) SupportsSharedfs

func (h *Hedge) SupportsSharedfs(_ string) bool

SupportsSharedfs returns a bool value depending on the monitor support for shared-fs

func (*Hedge) UsesKVM

func (h *Hedge) UsesKVM() bool

func (*Hedge) VMState

func (h *Hedge) VMState(name string) string

type Qemu

type Qemu struct {
	// contains filtered or unexported fields
}

func (*Qemu) Execve

func (q *Qemu) Execve(args types.ExecArgs, ukernel types.Unikernel) error

func (*Qemu) Ok

func (q *Qemu) Ok() error

func (*Qemu) Path

func (q *Qemu) Path() string

func (*Qemu) Stop

func (q *Qemu) Stop(pid int) error

func (*Qemu) SupportsSharedfs

func (q *Qemu) SupportsSharedfs(_ string) bool

SupportsSharedfs returns a bool value depending on the monitor support for shared-fs

func (*Qemu) UsesKVM

func (q *Qemu) UsesKVM() bool

UsesKVM returns a bool value depending on if the monitor uses KVM

type SPT

type SPT struct {
	// contains filtered or unexported fields
}

func (*SPT) Execve

func (s *SPT) Execve(args types.ExecArgs, ukernel types.Unikernel) error

func (*SPT) Ok

func (s *SPT) Ok() error

Ok checks if the spt binary is available in the system's PATH.

func (*SPT) Path

func (s *SPT) Path() string

Path returns the path to the spt binary.

func (*SPT) Stop

func (s *SPT) Stop(pid int) error

Stop kills the spt process

func (*SPT) SupportsSharedfs

func (s *SPT) SupportsSharedfs(_ string) bool

SupportsSharedfs returns a bool value depending on the monitor support for shared-fs

func (*SPT) UsesKVM

func (s *SPT) UsesKVM() bool

UsesKVM returns a bool value depending on if the monitor uses KVM

type VMMFactory

type VMMFactory struct {
	// contains filtered or unexported fields
}

type VmmType

type VmmType string
const (
	HedgeVmm VmmType = "hedge"

	ConsoleEndpoint = "/proc/vmcons"
)

Jump to

Keyboard shortcuts

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