Skip to main content

ESXi installer image generator

Project description

ESXi installer image generator

This tool is really a collection of two parts. One part ISO to image generator and another part with the ability to parse the same metadata that cloud-init consumes to setup an image.

Why This Exists

VMware ESXi does not provide OS images that can be used in the cloud like some other OSes do. You are also unable to install ESXi and then image that disk and reuse it for a different machine. Due to these limitations, and with the kind suggestions from Jens Sandmann at SAP Converged Cloud, we've packaged the installer into an image which can be deployed like a cloud image onto a system. The installer is then configured to perform a non-interactive installation and reboot the machine giving the user a working VMware ESXi machine.

How It Works

VMware ESXi uses an installer based on RedHat's Anaconda installer, that they've called weasel. It can be programmatically driven using kickstart files which have slight differences from RedHat's kickstart files. This is what is used to perform a non-interactive installation. To facilitate the data that cloud-init would use to configure an OS image we must add some extra steps to the process. The installer allows for user supplied scripts that will run with either busybox ash or Python. They can run either before or after the installer or the first time the machine is booted if it was not configured with Secure Boot.

To make the installation work we've split the scripts up into two parts. The ones that run inside of the installer and the ones that run on the firstboot.

The installer based pieces involve setting the root password and getting our firstboot scripts and data copied over to the installed system so that our firstboot scripts can run.

The firstboot scripts involve configuring the hostname, configuring the network, enabling the console, enabling SSH and setting the SSH key.

The VMware ESXi installer uses a boot protocol called multiboot which involves loading multiple modules. Modules that are specifically crafted tar files are extracted into the installer OS and made available to it. We utilize this method to get our data and scripts into the environment.

To create the image we craft a whole disk image with a bootable partition. We then copy the contents of the ISO into this bootable partition and configure our tar file to be included as a module as well as reference a kickstart file which makes the installation non-interactive.

Usage

# using uvx
uvx esxi-image --output esxi.img path/to/esxi.iso

# using pip
python -m venv .venv
source .venv/bin/activate
pip install esxi-img
esxi-img --output esxi.img path/to/esxi.iso

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

esxi_img-0.1.2.tar.gz (24.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

esxi_img-0.1.2-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file esxi_img-0.1.2.tar.gz.

File metadata

  • Download URL: esxi_img-0.1.2.tar.gz
  • Upload date:
  • Size: 24.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for esxi_img-0.1.2.tar.gz
Algorithm Hash digest
SHA256 462aa23880ea5d20774ac52c489b848aecc468773041dc2fd42ff36cf1ac2821
MD5 af1dd462c4694dc7620d7a2b2450b0b5
BLAKE2b-256 44cfad4656ae810d0b148aa6c3f5cd07f1b8a7571a608265426dc178e18a3c4f

See more details on using hashes here.

Provenance

The following attestation bundles were made for esxi_img-0.1.2.tar.gz:

Publisher: release.yaml on rackerlabs/esxi-img

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file esxi_img-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: esxi_img-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for esxi_img-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6844fcc8d9d03c0fc3180a48d713ef558c9a03ac9ba9a392e0c50e8b19f8a73f
MD5 83ff782513f3a2d01ab500125aab940f
BLAKE2b-256 b6439b8daa50e733941796d39d3a58b2ae90dcc390cbd2a0a62426810d63a6ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for esxi_img-0.1.2-py3-none-any.whl:

Publisher: release.yaml on rackerlabs/esxi-img

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page