qemu

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: BSD-3-Clause Imports: 15 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateVolume

func CreateVolume(path, format string, sizeMB int64) error

func DeleteVM

func DeleteVM(name string) error

func GetVMStatus

func GetVMStatus(name, dir string) (string, error)

func LaunchVM

func LaunchVM(c *VMConfig, verbose bool, extra ...string) (*exec.Cmd, error)

func StopVM

func StopVM(name string) error

func StoreConfig

func StoreConfig(c *VMConfig) error

func VMCommand

func VMCommand(c *VMConfig, verbose bool, extra ...string) (*exec.Cmd, error)

Types

type VMConfig

type VMConfig struct {
	Name        string // general
	Verbose     bool
	Cmd         string
	DisableKvm  bool
	Persist     bool
	InstanceDir string
	Monitor     string
	ConfigFile  string
	AioType     string
	Image       string // storage
	BackingFile bool
	Volumes     []string
	Memory      int64 // resources
	Cpus        int
	Networking  string // networking
	Bridge      string
	NatRules    []nat.Rule
	MAC         string
	VNCFile     string // VNC domain socket path
	KernelMode  bool
	KernelPath  string
}

func LoadConfig

func LoadConfig(name string) (*VMConfig, error)

func (*VMConfig) ValidateVmArguments

func (c *VMConfig) ValidateVmArguments(version *Version) error

type Version

type Version struct {
	Major int
	Minor int
	Patch int
}

func ParseVersion

func ParseVersion(text string) (*Version, error)

func ProbeVersion

func ProbeVersion() (*Version, error)

Jump to

Keyboard shortcuts

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