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_20251213 // SupportedKernelVersions lists all supported kernel versions SupportedKernelVersions = []KernelVersion{ Kernel_202511182, Kernel_20251211, Kernel_20251213, } )
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_202511182: { "x86_64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-1-202511182/vmlinux-x86_64", "aarch64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-1-202511182/Image-arm64", }, Kernel_20251211: { "x86_64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-1.1-20251211/vmlinux-x86_64", "aarch64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-1.1-20251211/Image-arm64", }, Kernel_20251213: { "x86_64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-1.2-20251213/vmlinux-x86_64", "aarch64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-1.2-20251213/Image-arm64", }, }
KernelDownloadURLs maps kernel versions and architectures to download URLs
var NvidiaDriverLibURLs = map[KernelVersion]map[string]string{ Kernel_20251213: { "x86_64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-1.2-20251213/nvidia-driver-libs-x86_64.tar.gz", }, }
NvidiaDriverLibURLs maps kernel versions and architectures to driver library tarball URLs These tarballs contain userspace NVIDIA libraries (libcuda.so, libnvidia-ml.so, etc.) that match the kernel modules and are injected into containers at boot time. See lib/devices/GPU.md for documentation on driver injection.
var NvidiaDriverVersion = map[KernelVersion]string{ Kernel_20251213: "570.86.16", }
NvidiaDriverVersion tracks the NVIDIA driver version bundled with each kernel
var NvidiaModuleURLs = map[KernelVersion]map[string]string{ Kernel_20251213: { "x86_64": "https://github.com/kernel/linux/releases/download/ch-6.12.8-kernel-1.2-20251213/nvidia-modules-x86_64.tar.gz", }, }
NvidiaModuleURLs maps kernel versions and architectures to NVIDIA module tarball URLs These tarballs contain pre-built NVIDIA kernel modules that match the kernel version
Functions ¶
Types ¶
type KernelVersion ¶
type KernelVersion string
KernelVersion represents a Cloud Hypervisor kernel version
const ( // Kernel versions from kernel/linux releases Kernel_202511182 KernelVersion = "ch-6.12.8-kernel-1-202511182" Kernel_20251211 KernelVersion = "ch-6.12.8-kernel-1.1-20251211" Kernel_20251213 KernelVersion = "ch-6.12.8-kernel-1.2-20251213" // NVIDIA module + driver lib support + networking configs )
type Manager ¶
type Manager interface {
// EnsureSystemFiles ensures default kernel and 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. |