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_202602101 // SupportedKernelVersions lists all supported kernel versions SupportedKernelVersions = []KernelVersion{ 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_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_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 ( // 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 current kernel version with overlayfs redirect_dir and index support Kernel_202602101 KernelVersion = "ch-6.12.8-kernel-1.4-202602101" )
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. |