qguest

package
v0.0.0-...-ede35a2 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package qguest describes non-device properties of a QEMU guest.

Index

Constants

View Source
const (
	ClockBaseUTC   = ClockBase("utc")
	ClockBaseLocal = ClockBase("localtime")
)

Possible clock base values.

View Source
const (
	ClockIsolationHost     = ClockIsolation("host")
	ClockIsolationRealtime = ClockIsolation("rt")
	ClockIsolationVM       = ClockIsolation("vm")
)

Possible clock isolation values.

View Source
const (
	ClockDriftFixNone = ClockDriftFix("none")
	ClockDriftFixSlew = ClockDriftFix("slew")
)

Possible ClockBase values.

Variables

This section is empty.

Functions

This section is empty.

Types

type Allocation

type Allocation interface {
	Size() string
}

Allocation is a memory allocation.

type Clock

type Clock struct {
	Base      ClockBase
	Isolation ClockIsolation
	DriftFix  ClockDriftFix
}

Clock configures the real time clock for a virtual machine.

func (Clock) Options

func (c Clock) Options() qemu.Options

Options returns a set of QEMU virtual machine options for the real time clock.

func (Clock) Parameters

func (c Clock) Parameters() qemu.Parameters

Parameters returns the parameters used for configuring the real time clock.

type ClockBase

type ClockBase string

ClockBase describes whether a VM's real time close follows UTC or not.

type ClockDriftFix

type ClockDriftFix string

ClockDriftFix specifies what to do when a VM fails to process its clock interrupts.

When set to slew, the host will try to resync the guest clock by playing clock ticks at a faster rate until the VM has caught up.

type ClockIsolation

type ClockIsolation string

ClockIsolation specifies how closely a VM's real time clock follows the host.

type Firmware

type Firmware struct {
	Code blockdev.NodeName
	Vars blockdev.NodeName
}

Firmware holds firmware configuration for a QEMU virtual machine.

func (Firmware) MachineParameters

func (f Firmware) MachineParameters() qemu.Parameters

MachineParameters returns a set of machine parameters for the firmware.

type GB

type GB int

GB represents some number of gibibytes.

func (GB) Size

func (gb GB) Size() string

Size returns the number of gibibytes as a string with the appropriate suffix.

type Identity

type Identity struct {
	Name string
	ID   UUID
}

Identity describes the identity of a QEMU guest.

func (Identity) Options

func (ident Identity) Options() qemu.Options

Options returns a set of QEMU virtual machine options for specifying its identity.

type MB

type MB int

MB represents some number of mebibytes.

func (MB) Size

func (mb MB) Size() string

Size returns the number of mebibytes as a string with the appropriate suffix.

type Memory

type Memory struct {
	Allocation Allocation
}

Memory describes the memory allocation for a QEMU guest.

func (Memory) Options

func (m Memory) Options() qemu.Options

Options returns a set of QEMU virtual machine options for specifying its memory configuration.

type Processor

type Processor struct {
	Sockets int
	Cores   int
	Threads int
	HyperV  bool
}

Processor describes the processor configuration of a QEMU guest.

func (Processor) CPU

func (p Processor) CPU() qemu.Parameters

CPU returns the parameters of the CPU configuration. It includes any processor enlightenments.

func (Processor) Options

func (p Processor) Options() qemu.Options

Options returns a set of QEMU virtual machine options for specifying its processor configuration.

func (Processor) SMP

func (p Processor) SMP() qemu.Parameters

SMP returns the parameters for the desired level of simultaneous multithreading.

type QMP

type QMP struct {
	Enabled bool
	Devices []chardev.ID
	Mode    string
	Pretty  bool
}

QMP holds QEMU Machine Protocol configuration for a QEMU virtual machine.

func (QMP) Options

func (q QMP) Options() qemu.Options

Options returns a set of QEMU virtual machine options for specifying its QMP configuration.

func (QMP) Parameters

func (q QMP) Parameters(device chardev.ID) qemu.Parameters

Parameters returns the parameters used for configuring QMP.

type Settings

type Settings struct {
	Identity  Identity
	Firmware  Firmware
	Clock     Clock
	Processor Processor
	Memory    Memory
	QMP       QMP
	Spice     Spice
	Globals   qemu.Globals
}

Settings describes all of the non-device properties of a QEMU guest.

func (Settings) Options

func (s Settings) Options() qemu.Options

Options returns a set of QEMU virtual machine options for implementing the specification.

type Spice

type Spice struct {
	Enabled             bool
	Port                int
	Addr                string
	DisableTicketing    bool
	DisableCopyPaste    bool
	DisableFileTransfer bool
}

Spice configures the spice protocol for external access to the virtual machine.

func (Spice) MachineParameters

func (s Spice) MachineParameters() qemu.Parameters

MachineParameters returns a set of machine parameters for spice.

func (Spice) Options

func (s Spice) Options() qemu.Options

Options returns a set of QEMU virtual machine options for enabling spice.

func (Spice) Parameters

func (s Spice) Parameters() qemu.Parameters

Parameters returns the parameters used for configuring spice.

type UUID

type UUID = uuid.UUID

UUID is a universally unique identifier for a QEMU guest.

Jump to

Keyboard shortcuts

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