Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrUnsupportedVersion is returned when a version is not supported ErrUnsupportedVersion = errors.New("unsupported version") // ErrDownloadFailed is returned when downloading system files fails ErrDownloadFailed = errors.New("download failed") // ErrBuildFailed is returned when building initrd fails ErrBuildFailed = errors.New("build failed") )
var ( // DefaultKernelVersion is the kernel version used for new instances DefaultKernelVersion = Kernel_202605291 // SupportedKernelVersions lists all supported kernel versions SupportedKernelVersions = []KernelVersion{ Kernel_202605291, Kernel_202603301, Kernel_202603091, Kernel_202602101, Kernel_202601152, } )
var GuestAgentBinary []byte
GuestAgentBinary contains the embedded guest-agent binary This is built by the Makefile before the main binary is compiled
var InitBinary []byte
InitBinary contains the embedded init binary for guest VMs. This is built by the Makefile before the main binary is compiled. The init binary is a statically-linked Go program that runs as PID 1 in the guest VM. It matches the architecture of the host (VMs run on the same arch as the host).
var InitWrapper []byte
var KernelDownloadURLs = map[KernelVersion]map[string]string{ Kernel_202605291: { "x86_64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-3.0-202605291/vmlinux-x86_64", "aarch64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-3.0-202605291/Image-arm64", }, Kernel_202603301: { "x86_64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-1.6-202603301/vmlinux-x86_64", "aarch64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-1.6-202603301/Image-arm64", }, Kernel_202603091: { "x86_64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-1.5-202603091/vmlinux-x86_64", "aarch64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-1.5-202603091/Image-arm64", }, Kernel_202602101: { "x86_64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-1.4-202602101/vmlinux-x86_64", "aarch64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-1.4-202602101/Image-arm64", }, Kernel_202601152: { "x86_64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-1.3-202601152/vmlinux-x86_64", "aarch64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-1.3-202601152/Image-arm64", }, }
KernelDownloadURLs maps kernel versions and architectures to download URLs
var KernelHeaderURLs = map[KernelVersion]map[string]string{ Kernel_202605291: { "x86_64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-3.0-202605291/kernel-headers-x86_64.tar.gz", "aarch64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-3.0-202605291/kernel-headers-aarch64.tar.gz", }, Kernel_202603301: { "x86_64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-1.6-202603301/kernel-headers-x86_64.tar.gz", "aarch64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-1.6-202603301/kernel-headers-aarch64.tar.gz", }, Kernel_202603091: { "x86_64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-1.5-202603091/kernel-headers-x86_64.tar.gz", "aarch64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-1.5-202603091/kernel-headers-aarch64.tar.gz", }, Kernel_202602101: { "x86_64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-1.4-202602101/kernel-headers-x86_64.tar.gz", "aarch64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-1.4-202602101/kernel-headers-aarch64.tar.gz", }, Kernel_202601152: { "x86_64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-1.3-202601152/kernel-headers-x86_64.tar.gz", "aarch64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-1.3-202601152/kernel-headers-aarch64.tar.gz", }, }
KernelHeaderURLs maps kernel versions and architectures to kernel header tarball URLs These tarballs contain kernel headers needed for DKMS to build out-of-tree modules (e.g., NVIDIA vGPU drivers)
Functions ¶
Types ¶
type KernelVersion ¶
type KernelVersion string
KernelVersion represents a Cloud Hypervisor kernel version
const ( // ImageKernelVersionLabel lets images request a specific guest kernel artifact. ImageKernelVersionLabel = "io.kernel.kernel-version" // Kernel_202601152 is the previous kernel version with vGPU support Kernel_202601152 KernelVersion = "ch-6.12.8-kernel-1.3-202601152" // Kernel_202602101 is the previous kernel version with overlayfs redirect_dir and index support Kernel_202602101 KernelVersion = "ch-6.12.8-kernel-1.4-202602101" // Kernel_202603091 is the current kernel version with iptables filter/xt match support for nested Hypeman networking Kernel_202603091 KernelVersion = "ch-6.12.8-kernel-1.5-202603091" // Kernel_202603301 is the current kernel version with expanded nftables/raw support for Docker bridge networking Kernel_202603301 KernelVersion = "ch-6.12.8-kernel-1.6-202603301" // Kernel_202605291 is the current kernel version with VMGenID support for snapshot resume detection Kernel_202605291 KernelVersion = "ch-6.12.8-kernel-3.0-202605291" )
func ParseKernelVersion ¶ added in v0.1.0
func ParseKernelVersion(version string) (KernelVersion, bool)
ParseKernelVersion returns a supported kernel version by exact artifact name.
type Manager ¶
type Manager interface {
// EnsureSystemFiles ensures all supported kernels and the current initrd exist.
EnsureSystemFiles(ctx context.Context) error
// GetKernelPath returns path to kernel file
GetKernelPath(version KernelVersion) (string, error)
// GetInitrdPath returns path to current initrd file
GetInitrdPath() (string, error)
// GetDefaultKernelVersion returns the default kernel version
GetDefaultKernelVersion() KernelVersion
}
Manager handles system files (kernel, initrd)
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package main implements the hypeman init binary that runs as PID 1 in guest VMs.
|
Package main implements the hypeman init binary that runs as PID 1 in guest VMs. |