cidata

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteTemplateCIDataISO

func ExecuteTemplateCIDataISO(args *TemplateArgs) ([]iso9660util.Entry, error)

func ExecuteTemplateCloudConfig

func ExecuteTemplateCloudConfig(args *TemplateArgs) ([]byte, error)

func GenerateCloudConfig

func GenerateCloudConfig(ctx context.Context, instDir, name string, instConfig *limatype.LimaYAML) error

func GenerateISO9660

func GenerateISO9660(ctx context.Context, drv driver.Driver, instDir, name string, instConfig *limatype.LimaYAML, udpDNSLocalPort, tcpDNSLocalPort int, guestAgentBinary, nerdctlArchive string, vsockPort int, virtioPort string, noCloudInit, rosettaEnabled, rosettaBinFmt bool) (string, error)

GenerateISO9660 generates the cidata ISO9660 image (or directory, for noCloudInit) in instDir. It returns the instance ID, which changes on every boot.

func ValidateTemplateArgs

func ValidateTemplateArgs(args *TemplateArgs) error

Types

type BootCmds

type BootCmds struct {
	Lines []string
}

type CACerts

type CACerts struct {
	RemoveDefaults *bool
	Trusted        []Cert
}

type Cert

type Cert struct {
	Lines []string
}

type Containerd

type Containerd struct {
	System  bool
	User    bool
	Archive string
}

type DataFile

type DataFile struct {
	FileName    string
	Overwrite   string
	Owner       string
	Path        string
	Permissions string
}

type Disk

type Disk struct {
	Name   string
	Device string
	Format bool
	FSType string
	FSArgs []string
}

type Mount

type Mount struct {
	Tag        string
	MountPoint string // abs path, accessible by the User
	Type       string
	Options    string
}

type Network

type Network struct {
	MACAddress string
	Interface  string
	Metric     uint32
}

type TemplateArgs

type TemplateArgs struct {
	Debug                           bool
	OS                              limatype.OS
	Name                            string // instance name
	Hostname                        string // instance hostname
	IID                             string // instance id
	User                            string // user name
	Comment                         string // user information
	Home                            string // home directory
	Shell                           string // login shell
	UID                             uint32
	SSHPubKeys                      []string
	Mounts                          []Mount
	MountType                       string
	Disks                           []Disk
	GuestInstallPrefix              string
	UpgradePackages                 bool
	Containerd                      Containerd
	Networks                        []Network
	SlirpNICName                    string
	SlirpGateway                    string
	SlirpDNS                        string
	SlirpIPAddress                  string
	UDPDNSLocalPort                 int
	TCPDNSLocalPort                 int
	Env                             map[string]string
	Param                           map[string]string
	BootScripts                     bool
	DataFiles                       []DataFile
	YQProvisions                    []YQProvision
	DNSAddresses                    []string
	CACerts                         CACerts
	HostHomeMountPoint              string
	BootCmds                        []BootCmds
	RosettaEnabled                  bool
	RosettaBinFmt                   bool
	SkipDefaultDependencyResolution bool
	VMType                          string
	VSockPort                       int
	VirtioPort                      string
	Plain                           bool
	TimeZone                        string
	NoCloudInit                     bool
}

type YQProvision

type YQProvision struct {
	FileName    string
	Format      string
	Owner       string
	Path        string
	Permissions string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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