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.0.tar.gz (23.2 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.0-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: esxi_img-0.1.0.tar.gz
  • Upload date:
  • Size: 23.2 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.0.tar.gz
Algorithm Hash digest
SHA256 37166fa279e623ee5bbc1c2cd1a0987c49983a3df215286869860f14a12f4892
MD5 9cd89e9c9b88dabee5fa1dd361636f05
BLAKE2b-256 4db5d6d5f669dedb34ff2e697116f61b699995efb1b99309ee652ae57f1b7ba9

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: esxi_img-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.0 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d3689c57ae5613690e0192b40ae28ff95e96dce202f280ced83f9be712b35e5a
MD5 8218995590a3697c71feb06452f5f08b
BLAKE2b-256 429ae1b71ea267952fb8c532ca142ae8f5c519659e8e535382f31f5079387b3f

See more details on using hashes here.

Provenance

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