Documentation
¶
Index ¶
- Constants
- func NewVMDriverFromConfig(ctx common.NodeContext, c *any) (common.NodeDriver, error)
- type OverlayImage
- type VMBios
- type VMConfig
- type VMDrive
- type VMDriver
- func (q *VMDriver) Config() common.NodeDriverConfig
- func (q *VMDriver) ID() common.NodeDriverID
- func (q *VMDriver) Info() (common.NodeDriverInfo, error)
- func (q *VMDriver) PowerOff() error
- func (q *VMDriver) PowerOn(cloudInit *cloudinit.CloudInit) error
- func (q *VMDriver) Restart(_ string, _ uint32) error
- func (q *VMDriver) Shutdown(_ string, _ uint32) error
- func (q *VMDriver) State() (common.NodeState, error)
- func (q *VMDriver) UpdateStatus() (common.NodeStatus, error)
- type VMGraphics
- type VMNetdev
- type VMNodeMetadata
- type VMTPM
Constants ¶
View Source
const VMDriverID common.NodeDriverID = "vm"
Variables ¶
This section is empty.
Functions ¶
func NewVMDriverFromConfig ¶
func NewVMDriverFromConfig(ctx common.NodeContext, c *any) (common.NodeDriver, error)
Types ¶
type OverlayImage ¶
func CreateOverlay ¶
func CreateOverlay(nodeName, imagePath string) (*OverlayImage, error)
func (*OverlayImage) Cleanup ¶
func (o *OverlayImage) Cleanup()
type VMConfig ¶
type VMConfig struct {
Machine string `json:"machine,omitempty"`
Accel []string `json:"accel,omitempty"`
CPU string `json:"cpu,omitempty"`
Memory int `json:"memory,omitempty"`
SMP string `json:"smp,omitempty"`
Serial string `json:"serial,omitempty"`
Bios *VMBios `json:"bios,omitempty"`
TPM *VMTPM `json:"tpm,omitempty"`
Graphics *VMGraphics `json:"graphics,omitempty"`
Drives []VMDrive `json:"drives,omitempty"`
Netdev []VMNetdev `json:"netdev,omitempty"`
Params []string `json:"params,omitempty"`
LibVirtSocket *string `json:"libvirt_socket,omitempty"`
}
type VMDriver ¶
type VMDriver struct {
// contains filtered or unexported fields
}
func (*VMDriver) Config ¶
func (q *VMDriver) Config() common.NodeDriverConfig
func (*VMDriver) ID ¶
func (q *VMDriver) ID() common.NodeDriverID
func (*VMDriver) UpdateStatus ¶ added in v0.2.7
func (q *VMDriver) UpdateStatus() (common.NodeStatus, error)
type VMGraphics ¶ added in v0.2.7
type VMNetdev ¶
type VMNetdev struct {
Type string `json:"type,omitempty"`
ID string `json:"id,omitempty"`
Ifname string `json:"ifname,omitempty"`
Script string `json:"script,omitempty"`
Downscript string `json:"downscript,omitempty"`
BR string `json:"br,omitempty"`
Helper string `json:"helper,omitempty"`
Net string `json:"net,omitempty"`
DHCPStart string `json:"dhcpstart,omitempty"`
Hostfwd []string `json:"hostfwd,omitempty"`
Mac string `json:"mac,omitempty"`
}
type VMNodeMetadata ¶
type VMNodeMetadata struct {
Drives map[int]OverlayImage `json:"overlay_drives"`
}
VMNodeMetadata is persisted in the nodes repository and used to rehydrate the libvirt domain XML across agent restarts.
Click to show internal directories.
Click to hide internal directories.