shimconfig

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: MIT Imports: 0 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Rendered for darwin/amd64

Overview

Package shimconfig defines the configuration types shared between the hypeman API server and the vz-shim subprocess.

Index

Constants

View Source
const (
	// SnapshotManifestFile is the metadata file stored in snapshot directories.
	// Kept as config.json to match existing snapshot path conventions.
	SnapshotManifestFile = "config.json"
	// SnapshotMachineStateFile is the serialized VM machine state filename.
	SnapshotMachineStateFile = "machine-state.vzm"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DiskConfig

type DiskConfig struct {
	Path     string `json:"path"`
	Readonly bool   `json:"readonly"`
}

DiskConfig represents a disk attached to the VM.

type NetworkConfig

type NetworkConfig struct {
	MAC string `json:"mac"`
}

NetworkConfig represents a network interface.

type ShimConfig

type ShimConfig struct {
	// Compute resources
	VCPUs       int   `json:"vcpus"`
	MemoryBytes int64 `json:"memory_bytes"`

	// Storage
	Disks []DiskConfig `json:"disks"`

	// Network
	Networks []NetworkConfig `json:"networks"`

	// Console
	SerialLogPath string `json:"serial_log_path"`

	// Boot configuration
	KernelPath string `json:"kernel_path"`
	InitrdPath string `json:"initrd_path"`
	KernelArgs string `json:"kernel_args"`

	// Socket paths (where shim should listen)
	ControlSocket string `json:"control_socket"`
	VsockSocket   string `json:"vsock_socket"`

	// Logging
	LogPath string `json:"log_path"`

	// Generic machine identifier data representation (base64), used to keep
	// platform identity stable across save/restore.
	MachineIdentifierData string `json:"machine_identifier_data,omitempty"`

	// Optional restore source (snapshot machine state file path).
	// When set, the shim restores instead of starting from cold boot.
	RestoreMachineStatePath string `json:"restore_machine_state_path,omitempty"`
}

ShimConfig is the configuration passed from hypeman to the shim.

type SnapshotManifest added in v0.0.7

type SnapshotManifest struct {
	Hypervisor       string     `json:"hypervisor"`
	MachineStateFile string     `json:"machine_state_file"`
	ShimConfig       ShimConfig `json:"shim_config"`
}

SnapshotManifest is persisted in snapshot directories to allow restore.

Jump to

Keyboard shortcuts

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