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-img --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

ESXi Network Interfaces

ESXi has physical network interfaces and logical interfaces. The vmnicX interfaces are the physical interfaces and the vmkX interfaces are the logical interfaces, which are also known as VMkernel interfaces.

Diagram of ESXi interfaces

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.3.tar.gz (780.4 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.3-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: esxi_img-0.1.3.tar.gz
  • Upload date:
  • Size: 780.4 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.3.tar.gz
Algorithm Hash digest
SHA256 b5ad9943b7d65121857d2641606ec42777cde683c31806b12a3e9555868d6ea4
MD5 c9890646be5b79ae9f2b03a43d9deeed
BLAKE2b-256 ebbceaceca4610588123e6e5bcd7de85ebf7e6f32e41b30250543c40718aaffe

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: esxi_img-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 17.1 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e776caeaf70f3275b29b79ba0edbd8059a46130072baf7ce5448a9e06e0a1dca
MD5 2df88596304d588d2619319e9bf49ad4
BLAKE2b-256 b9b03d540d1a4a659cf3d4e9f949704a530d2ceef49503d88e0d3d977af9beb2

See more details on using hashes here.

Provenance

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