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.1.tar.gz (24.0 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.1-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: esxi_img-0.1.1.tar.gz
  • Upload date:
  • Size: 24.0 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.1.tar.gz
Algorithm Hash digest
SHA256 b65de90ebdcde1be240420a98313b8bc3daab1676689860301b9b421f29ab2d6
MD5 196a1ca834f271b72e5219cb72295a9f
BLAKE2b-256 7169e94360763b15cc716e3f9f91ae79228773db6ea18628248ac3c2786ae596

See more details on using hashes here.

Provenance

The following attestation bundles were made for esxi_img-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: esxi_img-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.5 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7a534638765661014831f89637ba4e40b120a05634d31476f7328be95b27897b
MD5 2cb6e7bbe81f5b621b78d9b439fec9f6
BLAKE2b-256 ba519571bb5a9aad278862ee47cd23fa2c846357890c0568927a61fbdb3ec9d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for esxi_img-0.1.1-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