qemu

package
v0.0.0-...-f0802c0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2020 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListConfigs

func ListConfigs(configDir string) ([]string, error)

func Run

func Run(config *VirtualMachine) error

Types

type Drive

type Drive struct {
	File      string `yaml:"file" json:"file"`
	Interface string `yaml:"interface" json:"interface"`
	Media     string `yaml:"media" json:"media"`
	Snapshot  bool   `yaml:"snapshot" json:"snapshot"`
	Cache     string `yaml:"cache" json:"cache"`
	Format    string `yaml:"format" json:"format"`
}

type NIC

type NIC struct {
	Bridge      string            `yaml:"bridge" json:"bridge"`
	MACAddr     string            `yaml:"mac_address" json:"mac_address"`
	Model       string            `yaml:"model" json:"model"`
	NetUserArgs map[string]string `yaml:"net_user_args" json:"net_user_args"`
	// contains filtered or unexported fields
}

func (*NIC) SetDevice

func (n *NIC) SetDevice(device string)

type VirtualMachine

type VirtualMachine struct {
	AutoStart bool `yaml:"auto_start" json:"auto_start"`

	SystemTarget string `yaml:"system_target" json:"system_target"`
	MachineType  string `yaml:"machine_type" json:"machine_type"`
	RunAs        string `yaml:"run_as" json:"run_as"`
	EnableKVM    bool   `yaml:"enable_kvm" json:"enable_kvm"`

	Boot   map[string]string `yaml:"boot" json:"boot"`
	Drives []*Drive          `yaml:"drives" json:"drives"`
	NICs   []*NIC            `yaml:"nics" json:"nics"`

	CPUModel   string `yaml:"cpu_model" json:"cpu_model"`
	CPUs       int    `yaml:"cpus" json:"cpus"`
	RAM        string `yaml:"ram" json:"ram"`
	VNCDisplay string `yaml:"vnc_display" json:"vnc_display"`

	AdditionalArgs []string `yaml:"additional_args" json:"additional_args"`

	ShutdownTimeout int `yaml:"shutdown_timeout" json:"shutdown_timeout"`
	MaximumRetries  int `yaml:"maximum_retries" json:"maximum_retries"`
	// contains filtered or unexported fields
}

func ParseConfig

func ParseConfig(configDir string, name string) (*VirtualMachine, error)

func (*VirtualMachine) SetName

func (vm *VirtualMachine) SetName(name string)

func (*VirtualMachine) SetPIDFile

func (vm *VirtualMachine) SetPIDFile(pidfile string)

func (*VirtualMachine) SetQMP

func (vm *VirtualMachine) SetQMP(qmp string)

Jump to

Keyboard shortcuts

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