qemu

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2019 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateVolume added in v0.4.0

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 added in v0.1.3

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
}

func LoadConfig

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

func (*VMConfig) ValidateVmArguments added in v0.4.0

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