ESX Networking setup scripts
esxi_netinit is a Python program to configure network information on an ESXi
host, and is intended to be run during the firstboot of ESXi after install.
It will read data provided in the Openstack config-drive format and use that to configure the host.
config-drive files
The files from the config-drive that are used are:
meta_data.json(to get the supplied hostname)network_data.json(to get the network configuration & DNS servers)user_data(optional, to control what settings are applied)
What it does
- Set the device hostname (from the value supplied in
meta_data.json) - Delete the default ESXi vmkernel (
vmk0), portgroupManagement Networkand vswitch (vswitch0) - Create a new vSwitch, portgroup and vmkernel for the management network (from
the data supplied in
network_data.json) - Configure the default route (from the data supplied in
network_data.json) - Configure the DNS server(s) (from the data supplied in
network_data.json) - (optionally) Configure additional vswitches, portroups & vmkernels
(from the data supplied in
network_data.json) - Configure any static routes (from the data supplied in
network_data.json)
The device should be rebooted after this configuration is applied
user_data settings
The user_data file can be used to control some of the actions of the script.
It is a yaml file, and esxi_netinit will read the following keys (default values shown):
configure_all_networks: false
management_vswitch: "vSwitch0"
management_portgroup: "Management Portgroup"
first_extra_vswitch_number: 1
The keys have the following meanings:
| Key | Default | Meaning |
|---|---|---|
configure_all_networks |
false |
Whether to only configure the management network (default), or all defined networks |
management_vswitch |
"vSwitch0" | Name of the vSwitch to create for the management network |
management_portgroup |
"Management Portrgoup" | Name of the portgroup for the vSwitch on the management network |
first_extra_vswitch_number |
1 | vSwitches for additional networks will be numbered in sequence starting from this value |
Note that vmkernel nics will be created strictly in sequence vmk0, vmk1, etc.
The default behaviour of the code is to create a single vSwitch, portgroup and vmkernel with the same names that the ESXi installer gives them - this is because other VMware tooling may expect new hypervisor hosts to be configured in this way (e.g. for enrolling into VCF).
However, if your use-case allows for additional network configuration to be applied to
the host during provisioning, setting configure_all_networks: true will allow
esxi_netinit to do that for you.
Release files for esxi-netinit 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| esxi_netinit-0.2.0.tar.gz | 14.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| esxi_netinit-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.3 kB
Release files / esxi_netinit-0.2.0.tar.gz
| Download URL | esxi_netinit-0.2.0.tar.gz |
|---|---|
| Size | 14.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
27065f28c09c9411f7ebf99070e4bcdfcb1651cf9d875735700248b5bcc66f26
|
|
BLAKE2b-256 checksum How to use checksums |
d3f4e7dcb00ae71f82026b056cf7ddcf4cc6ff0ddadf51bbc15cfc9b84852557
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.
Transparency logRelease files / esxi_netinit-0.2.0-py3-none-any.whl
| Download URL | esxi_netinit-0.2.0-py3-none-any.whl |
|---|---|
| Size | 12.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5aad04948f5b0be20625eb7a9a1c7d811e6d7e85212acf4f08ec6ae4e602b5e8
|
|
BLAKE2b-256 checksum How to use checksums |
1374d89a7b362a633aee287263f2802022cae81a73301df8825a6c882349a1e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.
Transparency log