cli

package
v0.0.0-...-b9b11d6 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2025 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadCLI

func DownloadCLI(vmName string) tea.Model

func FirstBoot

func FirstBoot(vmdir string) error

FirstBoot runs the Windows installation process using libvirt

func NewVM

func NewVM(vmdir string)

Types

type Address

type Address struct {
	Type     string `xml:"type,attr,omitempty"`
	Domain   string `xml:"domain,attr,omitempty"`
	Bus      string `xml:"bus,attr,omitempty"`
	Slot     string `xml:"slot,attr,omitempty"`
	Function string `xml:"function,attr,omitempty"`
}

type Boot

type Boot struct {
	Dev string `xml:"dev,attr"`
}

type CPU

type CPU struct {
	Mode     string    `xml:"mode,attr"`
	Check    string    `xml:"check,attr,omitempty"`
	Topology *Topology `xml:"topology,omitempty"`
}

type Channel

type Channel struct {
	Type   string         `xml:"type,attr"`
	Target *ChannelTarget `xml:"target,omitempty"`
}

type ChannelTarget

type ChannelTarget struct {
	Type string `xml:"type,attr"`
	Name string `xml:"name,attr,omitempty"`
}

type Clock

type Clock struct {
	Offset string  `xml:"offset,attr"`
	Timer  []Timer `xml:"timer"`
}

type Console

type Console struct {
	Type   string         `xml:"type,attr"`
	Target *ConsoleTarget `xml:"target,omitempty"`
}

type ConsoleTarget

type ConsoleTarget struct {
	Type string `xml:"type,attr,omitempty"`
	Port string `xml:"port,attr,omitempty"`
}

type Controller

type Controller struct {
	Type    string   `xml:"type,attr"`
	Index   string   `xml:"index,attr"`
	Model   string   `xml:"model,attr,omitempty"`
	Address *Address `xml:"address,omitempty"`
}

type Devices

type Devices struct {
	Emulator    string       `xml:"emulator"`
	Disks       []Disk       `xml:"disk"`
	Controllers []Controller `xml:"controller"`
	Interfaces  []Interface  `xml:"interface"`
	Serials     []Serial     `xml:"serial"`
	Consoles    []Console    `xml:"console"`
	Channels    []Channel    `xml:"channel"`
	Graphics    []Graphics   `xml:"graphics"`
	Videos      []Video      `xml:"video"`
	Inputs      []Input      `xml:"input"`
	USBs        []USB        `xml:"hostdev,omitempty"`
	RNGs        []RNG        `xml:"rng"`
	Sounds      []Sound      `xml:"sound,omitempty"`
	MemBalloon  *MemBalloon  `xml:"memballoon,omitempty"`
}

type Disk

type Disk struct {
	Type   string      `xml:"type,attr"`
	Device string      `xml:"device,attr"`
	Driver *DiskDriver `xml:"driver,omitempty"`
	Source *DiskSource `xml:"source,omitempty"`
	Target DiskTarget  `xml:"target"`
	Boot   *Boot       `xml:"boot,omitempty"`
}

type DiskDriver

type DiskDriver struct {
	Name    string `xml:"name,attr"`
	Type    string `xml:"type,attr,omitempty"`
	Cache   string `xml:"cache,attr,omitempty"`
	IO      string `xml:"io,attr,omitempty"`
	Discard string `xml:"discard,attr,omitempty"`
}

type DiskSource

type DiskSource struct {
	File string `xml:"file,attr,omitempty"`
}

type DiskTarget

type DiskTarget struct {
	Dev string `xml:"dev,attr"`
	Bus string `xml:"bus,attr,omitempty"`
}

type DownloadModel

type DownloadModel interface {
	tea.Model
	GetSelections() *DownloadSelections
}

type DownloadSelections

type DownloadSelections struct {
	SelectedVersion      string
	SelectedArch         string
	SelectedLanguage     string
	SelectedEdition      string
	SelectedCustomISO    string
	SelectedCustomVirtio string
	VmName               string
}

type Features

type Features struct {
	ACPI struct{} `xml:"acpi"`
	APIC struct{} `xml:"apic"`
	GIC  *GIC     `xml:"gic,omitempty"`
}

type GIC

type GIC struct {
	Version string `xml:"version,attr"`
}

type Graphics

type Graphics struct {
	Type     string `xml:"type,attr"`
	Port     string `xml:"port,attr,omitempty"`
	AutoPort string `xml:"autoport,attr,omitempty"`
	Listen   string `xml:"listen,attr,omitempty"`
}

type HostCapabilities

type HostCapabilities struct {
	Architecture    string // "arm64", "amd64", "arm"
	SupportsAtomics bool   // For ARM64: whether CPU supports atomics instruction
	IsARMv9         bool   // For ARM64: whether this is an ARMv9 CPU (no 32-bit support)
	HostDescription string // Human-readable description
}

HostCapabilities represents what the current hardware can run

type Input

type Input struct {
	Type string `xml:"type,attr"`
	Bus  string `xml:"bus,attr"`
}

type Interface

type Interface struct {
	Type   string           `xml:"type,attr"`
	Source *InterfaceSource `xml:"source,omitempty"`
	Model  *InterfaceModel  `xml:"model,omitempty"`
}

type InterfaceModel

type InterfaceModel struct {
	Type string `xml:"type,attr"`
}

type InterfaceSource

type InterfaceSource struct {
	Network string `xml:"network,attr,omitempty"`
}

type LibvirtDomainXML

type LibvirtDomainXML struct {
	XMLName       xml.Name `xml:"domain"`
	Type          string   `xml:"type,attr"`
	Name          string   `xml:"name"`
	UUID          string   `xml:"uuid,omitempty"`
	Memory        Memory   `xml:"memory"`
	CurrentMemory Memory   `xml:"currentMemory"`
	VCPU          VCPU     `xml:"vcpu"`
	OS            OS       `xml:"os"`
	Features      Features `xml:"features"`
	CPU           CPU      `xml:"cpu"`
	Clock         Clock    `xml:"clock"`
	OnPoweroff    string   `xml:"on_poweroff"`
	OnReboot      string   `xml:"on_reboot"`
	OnCrash       string   `xml:"on_crash"`
	Devices       Devices  `xml:"devices"`
}

LibvirtDomainXML represents the structure for libvirt domain XML

type Loader

type Loader struct {
	ReadOnly string `xml:"readonly,attr"`
	Type     string `xml:"type,attr"`
	Value    string `xml:",chardata"`
}

type MemBalloon

type MemBalloon struct {
	Model string `xml:"model,attr"`
}

type Memory

type Memory struct {
	Unit  string `xml:"unit,attr"`
	Value string `xml:",chardata"`
}

type NVRam

type NVRam struct {
	Value string `xml:",chardata"`
}

type OS

type OS struct {
	Type     OSType  `xml:"type"`
	Firmware string  `xml:"firmware,attr,omitempty"`
	Loader   *Loader `xml:"loader,omitempty"`
	NVRam    *NVRam  `xml:"nvram,omitempty"`
	Boot     []Boot  `xml:"boot,omitempty"`
}

type OSType

type OSType struct {
	Arch    string `xml:"arch,attr"`
	Machine string `xml:"machine,attr"`
	Value   string `xml:",chardata"`
}

type RNG

type RNG struct {
	Model   string     `xml:"model,attr"`
	Backend RNGBackend `xml:"backend"`
}

type RNGBackend

type RNGBackend struct {
	Model string `xml:"model,attr"`
	Value string `xml:",chardata"`
}

type Serial

type Serial struct {
	Type   string        `xml:"type,attr"`
	Target *SerialTarget `xml:"target,omitempty"`
}

type SerialTarget

type SerialTarget struct {
	Type string `xml:"type,attr,omitempty"`
	Port string `xml:"port,attr,omitempty"`
}

type Sound

type Sound struct {
	Model string `xml:"model,attr"`
}

type Timer

type Timer struct {
	Name       string `xml:"name,attr"`
	Tickpolicy string `xml:"tickpolicy,attr,omitempty"`
	Present    string `xml:"present,attr,omitempty"`
}

type Topology

type Topology struct {
	Sockets string `xml:"sockets,attr"`
	Cores   string `xml:"cores,attr"`
	Threads string `xml:"threads,attr"`
}

type USB

type USB struct {
	Mode   string     `xml:"mode,attr"`
	Type   string     `xml:"type,attr"`
	Source *USBSource `xml:"source"`
}

type USBProduct

type USBProduct struct {
	ID string `xml:"id,attr"`
}

type USBSource

type USBSource struct {
	Vendor  *USBVendor  `xml:"vendor"`
	Product *USBProduct `xml:"product"`
}

type USBVendor

type USBVendor struct {
	ID string `xml:"id,attr"`
}

type VCPU

type VCPU struct {
	Placement string `xml:"placement,attr"`
	Value     string `xml:",chardata"`
}

type Video

type Video struct {
	Model VideoModel `xml:"model"`
}

type VideoModel

type VideoModel struct {
	Type    string `xml:"type,attr"`
	VRam    string `xml:"vram,attr,omitempty"`
	Heads   string `xml:"heads,attr,omitempty"`
	Primary string `xml:"primary,attr,omitempty"`
}

Jump to

Keyboard shortcuts

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