vm

package
v0.4.1-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FCSockDir where vm firecracker sockets are kept
	FCSockDir = "/var/run/firecracker"
)

Variables

This section is empty.

Functions

func NewVMModule

func NewVMModule(root string) (pkg.VMModule, error)

NewVMModule creates a new instance of vm manager

Types

type Boot

type Boot struct {
	Kernel string `json:"kernel_image_path"`
	Initrd string `json:"initrd_path,omitempty"`
	Args   string `json:"boot_args"`
}

Boot config struct

type Config

type Config struct {
	CPU       uint8 `json:"vcpu_count"`
	Mem       int64 `json:"mem_size_mib"`
	HTEnabled bool  `json:"ht_enabled"`
}

Config struct

type Drive

type Drive struct {
	ID         string `json:"drive_id"`
	Path       string `json:"path_on_host"`
	RootDevice bool   `json:"is_root_device"`
	ReadOnly   bool   `json:"is_read_only"`
}

Drive struct

type Interface

type Interface struct {
	ID  string `json:"iface_id"`
	Tap string `json:"host_dev_name"`
	Mac string `json:"guest_mac,omitempty"`
}

Interface nic struct

type Machine

type Machine struct {
	ID         string      `json:"-"`
	Boot       Boot        `json:"boot-source"`
	Drives     []Drive     `json:"drives"`
	Interfaces []Interface `json:"network-interfaces"`
	Config     Config      `json:"machine-config"`
}

Machine struct

func (*Machine) Log

func (m *Machine) Log(base string) string

Log returns machine log file path

func (*Machine) Start

func (m *Machine) Start(ctx context.Context, base string) error

Start starts the machine.

Jump to

Keyboard shortcuts

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