command

package
v5.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProxyVariables

func GetProxyVariables() map[string]string

Types

type Monitor

type Monitor struct {
	//	Address portion of the qmp monitor (/tmp/tmp.sock)
	Address define.VMFile
	// Network portion of the qmp monitor (unix)
	Network string
	// Timeout in seconds for qmp monitor transactions
	Timeout time.Duration
}

func NewQMPMonitor

func NewQMPMonitor(name string, machineRuntimeDir *define.VMFile) (Monitor, error)

NewQMPMonitor creates the monitor subsection of our vm

type QemuCmd

type QemuCmd []string

QemuCmd is an alias around a string slice to prevent the need to migrate the MachineVM struct due to changes

func NewQemuBuilder

func NewQemuBuilder(binary string, options []string) QemuCmd

NewQemuBuilder creates a new QemuCmd object that we will build on top of, starting with the qemu binary, architecture specific options, and propagated proxy and SSL settings

func PropagateHostEnv

func PropagateHostEnv(cmdLine QemuCmd) QemuCmd

PropagateHostEnv is here for providing the ability to propagate proxy and SSL settings (e.g. HTTP_PROXY and others) on a start and avoid a need of re-creating/re-initiating a VM

func (*QemuCmd) Build

func (q *QemuCmd) Build() []string

func (*QemuCmd) SetBootableImage

func (q *QemuCmd) SetBootableImage(image string)

SetBootableImage specifies the image the machine will use to boot

func (*QemuCmd) SetCPUs

func (q *QemuCmd) SetCPUs(c uint64)

SetCPUs adds the number of CPUs the machine will have

func (*QemuCmd) SetDisplay

func (q *QemuCmd) SetDisplay(display string)

SetDisplay specifies whether the machine will have a display

func (*QemuCmd) SetIgnitionFile

func (q *QemuCmd) SetIgnitionFile(file define.VMFile)

SetIgnitionFile specifies the machine's ignition file

func (*QemuCmd) SetMemory

func (q *QemuCmd) SetMemory(m uint64)

SetMemory adds the specified amount of memory for the machine

func (*QemuCmd) SetNetwork

func (q *QemuCmd) SetNetwork()

SetNetwork adds a network device to the machine

func (*QemuCmd) SetPropagatedHostEnvs

func (q *QemuCmd) SetPropagatedHostEnvs()

SetPropagatedHostEnvs adds options that propagate SSL and proxy settings

func (*QemuCmd) SetQmpMonitor

func (q *QemuCmd) SetQmpMonitor(monitor Monitor)

SetQmpMonitor specifies the machine's qmp socket

func (*QemuCmd) SetSerialPort

func (q *QemuCmd) SetSerialPort(readySocket, vmPidFile define.VMFile, name string)

SetSerialPort adds a serial port to the machine for readiness

func (*QemuCmd) SetUSBHostPassthrough

func (q *QemuCmd) SetUSBHostPassthrough(usbs []USBConfig)

SetNetwork adds a network device to the machine

func (*QemuCmd) SetVirtfsMount

func (q *QemuCmd) SetVirtfsMount(source, tag, securityModel string, readonly bool)

SetVirtfsMount adds a virtfs mount to the machine

type USBConfig

type USBConfig struct {
	Bus       string
	DevNumber string
	Vendor    int
	Product   int
}

func ParseUSBs

func ParseUSBs(usbs []string) ([]USBConfig, error)

Jump to

Keyboard shortcuts

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