qemu

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MachineConfig

type MachineConfig struct {
	Alias        string   `yaml:"alias"`
	Image        string   `yaml:"image"`
	Arch         string   `yaml:"arch"`
	CPU          string   `yaml:"cpu"`
	Memory       string   `yaml:"memory"`
	Disk         string   `yaml:"disk"`
	Mount        string   `yaml:"mount"`
	Port         string   `yaml:"port"`
	SSHPort      string   `yaml:"sshport"`
	SSHUser      string   `yaml:"sshuser"`
	SSHPassword  string   `yaml:"sshpassword"`
	RootPassword *string  `yaml:"rootpassword,omitempty"`
	MACAddress   string   `yaml:"macaddress"`
	Location     string   `yaml:"location"`
	Tags         []string `yaml:"tags"`
}

func (*MachineConfig) CleanPIDFile

func (c *MachineConfig) CleanPIDFile()

func (*MachineConfig) CreateQemuDiskImage

func (c *MachineConfig) CreateQemuDiskImage(imageName string) error

CreateQemuDiskImage creates a qcow2 disk image

func (*MachineConfig) Exec

func (c *MachineConfig) Exec(cmd string, root bool) error

Exec starts an interactive shell terminal in VM

func (*MachineConfig) GetAccel

func (c *MachineConfig) GetAccel() string

GetAccel Returns platform-appropriate accelerator

func (*MachineConfig) HasHostCPU

func (c *MachineConfig) HasHostCPU() bool

func (*MachineConfig) IsNativeArch

func (c *MachineConfig) IsNativeArch() bool

IsNativeArch tests if VM architecture is the same as host

func (*MachineConfig) Launch

func (c *MachineConfig) Launch() error

Launch macpine downloads a fresh image and creates a VM directory

func (*MachineConfig) Pause

func (c *MachineConfig) Pause() error

Pauses an Alpine VM

func (*MachineConfig) ResizeQemuDiskImage

func (c *MachineConfig) ResizeQemuDiskImage() error

ResizeQemuDiskImage resizes a qcow2 disk image

func (*MachineConfig) Resume

func (c *MachineConfig) Resume() error

Unpauses an Alpine VM

func (*MachineConfig) Start

func (c *MachineConfig) Start() error

Start starts up an Alpine VM

func (*MachineConfig) Status

func (c *MachineConfig) Status() (string, int)

Status returns VM status

func (*MachineConfig) Stop

func (c *MachineConfig) Stop() error

Stop stops an Alpine VM

Jump to

Keyboard shortcuts

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