qemu

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2020 License: MPL-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Launch

func Launch() error

Launch a control process around qemu VM manager.

This function is invoked from 'talosctl qemu-launch' hidden command and wraps starting, controlling 'qemu' VM process.

Launch restarts VM forever until control process is stopped itself with a signal.

Process is expected to receive configuration on stdin. Current working directory should be cluster state directory, process output should be redirected to the logfile in state directory.

When signals SIGINT, SIGTERM are received, control process stops qemu and exits.

nolint: gocyclo

func NewProvisioner

func NewProvisioner(ctx context.Context) (provision.Provisioner, error)

NewProvisioner initializes qemu provisioner.

Types

type LaunchConfig

type LaunchConfig struct {
	StatePath string

	// VM options
	DiskPath          string
	VCPUCount         int64
	MemSize           int64
	QemuExecutable    string
	KernelImagePath   string
	InitrdPath        string
	KernelArgs        string
	MachineType       string
	EnableKVM         bool
	BootloaderEnabled bool

	// Talos config
	Config string

	// Network
	NetworkConfig *libcni.NetworkConfigList
	CNI           provision.CNIConfig
	IP            net.IP
	CIDR          net.IPNet
	Hostname      string
	GatewayAddr   net.IP
	MTU           int
	Nameservers   []net.IP
	// contains filtered or unexported fields
}

LaunchConfig is passed in to the Launch function over stdin.

Jump to

Keyboard shortcuts

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