esxi

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: BSD-3-Clause Imports: 15 Imported by: 15

Documentation

Overview

Package esxi contains an ESXi boot config parser for disks and CDROMs.

For CDROMs, it parses the boot.cfg found in the root directory and tries to boot from it.

For disks, there may be multiple boot partitions:

- Locates both <device>5/boot.cfg and <device>6/boot.cfg.

- If parsable, chooses partition with bootstate=(0|2|empty) and greater updated=N.

Sometimes, an ESXi partition can contain a valid boot.cfg, but not actually any of the named modules. Hence it is important to try fully loading ESXi into memory, and only then falling back to the other partition.

Only boots partitions with bootstate=0, bootstate=2, bootstate=(empty) will boot at all.

Most of the parsing logic in this package comes from https://github.com/vmware/esx-boot/blob/master/safeboot/bootbank.c

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadCDROM

func LoadCDROM(device string) (*boot.MultibootImage, *mount.MountPoint, error)

LoadCDROM loads an ESXi multiboot kernel from a CDROM at device.

device will be mounted at mountPoint.

func LoadConfig

func LoadConfig(configFile string) (*boot.MultibootImage, error)

LoadConfig loads an ESXi configuration from configFile.

func LoadDisk

func LoadDisk(device string) ([]*boot.MultibootImage, []*mount.MountPoint, error)

LoadDisk loads the right ESXi multiboot kernel from partitions 5 or 6 of the given device.

The kernels are returned in the priority order according to the bootstate and updated values in their boot configurations.

The caller should try loading all returned images in order, as some of them may not be valid.

device5 and device6 will be mounted at temporary directories.

Types

This section is empty.

Jump to

Keyboard shortcuts

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