virsh

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(containerName string, podmanClient *podman.Client) *Client

func (*Client) ExecInContainer

func (c *Client) ExecInContainer(ctx context.Context, args ...string) (string, error)

func (*Client) Genisoimage

func (c *Client) Genisoimage(ctx context.Context, outputPath, volumeID string, files []string) error

func (*Client) QemuImgCreate

func (c *Client) QemuImgCreate(ctx context.Context, opts *QemuImgCreateOptions) error

func (*Client) VirtInstall

func (c *Client) VirtInstall(ctx context.Context, opts *VirtInstallOptions) error

type FilesystemConfig

type FilesystemConfig struct {
	Source     string // Host path (in container)
	Target     string // Mount tag name for guest
	AccessMode string // mapped, passthrough, squash (default: passthrough)
	ReadOnly   bool
}

type NetworkConfig

type NetworkConfig struct {
	Type        string
	Model       string
	MAC         string
	PortForward string
}

type QemuImgCreateOptions

type QemuImgCreateOptions struct {
	Path          string
	Format        string
	BackingFile   string
	BackingFormat string
	Size          string
}

type VirtInstallOptions

type VirtInstallOptions struct {
	Name             string
	Memory           int
	MaxMemory        int
	VCPUs            int
	Disks            []string
	Networks         []NetworkConfig
	Filesystems      []FilesystemConfig
	XMLModifications []string
}

Jump to

Keyboard shortcuts

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