vmconfig

package
v0.0.0-...-efcb13b Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddVMFlags

func AddVMFlags(set *flag.FlagSet, cfg *VMConfig)

func ArchStringToQemu

func ArchStringToQemu(arch string) string

func CanUseHostCPU

func CanUseHostCPU(arch string) bool

func DoVsock

func DoVsock(cid uint32, uid, gid int) error

func ForwardPort

func ForwardPort(localPort, remotePort int) error

func GetDefaultCPUArch

func GetDefaultCPUArch() string

func GetLocalPorts

func GetLocalPorts(forwards []int) ([]int, error)

func PortForwardsToQemuFlag

func PortForwardsToQemuFlag(local, forwards []int) string

Types

type VMConfig

type VMConfig struct {
	CPUArch       string
	NumCPU        int
	PortForwards  intListFlag
	NoKVM         bool
	RequireKVM    bool
	NoMicro       bool
	CgroupVersion int
	Memory        string
	DebugConsole  bool
	Uid           int
	Gid           int
	InitCmd       string

	// The code around this was remove so it really doesn't do anything right now.
	// Keeping for now as fully removing means trashing code that may still be useful.
	UseVsock       bool
	SocketForwards socketListFlag
}

func (VMConfig) AsFlags

func (c VMConfig) AsFlags() []string

Jump to

Keyboard shortcuts

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