rootfs

package
v0.12.0 Latest Latest
Warning

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

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

Documentation

Overview

Package rootfs builds root filesystems for VMs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

Builder builds rootfs images for microVMs from OCI layers.

func NewBuilder

func NewBuilder(workDir string) *Builder

NewBuilder creates a rootfs builder.

func (*Builder) BuildMinimalRootfs

func (b *Builder) BuildMinimalRootfs(vmID string, rootfsDir string, dokiInitPath string) (string, error)

BuildMinimalRootfs builds a minimal rootfs with just the OCI layers and the doki-init binary injected. Searches for doki-init-rust first, falls back to doki-init (Go).

func (*Builder) BuildRootfs

func (b *Builder) BuildRootfs(vmID string, rootfsDir string, sizeMB int) (string, error)

BuildRootfs builds an ext4 rootfs image from extracted OCI layers.

type KernelManager

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

KernelManager manages kernel images for microVMs.

func NewKernelManager

func NewKernelManager(kernelDir string) *KernelManager

NewKernelManager creates a kernel manager.

func (*KernelManager) GetKernelPath

func (k *KernelManager) GetKernelPath() (string, error)

GetKernelPath returns the path to the kernel for the current architecture.

func (*KernelManager) HasKernel

func (k *KernelManager) HasKernel() bool

HasKernel checks if a kernel is available.

Jump to

Keyboard shortcuts

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