Home Knowledge base Virtualization How to Install VMware ESXi and Deploy vCenter with esxcli and the VCSA CLI KNOWLEDGE BASE

How to Install VMware ESXi and Deploy vCenter with esxcli and the VCSA CLI

A hands-on walkthrough for engineers: image an ESXi host, configure networking, NTP, storage and software with esxcli, then deploy vCenter (VCSA) using vcsa-deploy from a JSON template.

This guide walks through standing up a VMware vSphere environment from the command line: installing and configuring an ESXi host with esxcli, then deploying the vCenter Server Appliance (VCSA) with the vcsa-deploy CLI installer. Commands here are for vSphere 8.x; the same tools apply to the vSphere 9 / VCF 9 generation. SSH must be enabled on the host (Host → Manage → Services, or via the DCUI) before running esxcli remotely.

1. Install ESXi on the host

Boot the host from the ESXi ISO (USB, virtual media/iLO/iDRAC, or PXE). The interactive installer prompts for the target boot disk, keyboard layout and root password. For repeatable, hands-off installs use a kickstart file referenced at boot, for example:

ks=http://192.0.2.10/ks/esxi-ks.cfg

A minimal kickstart sets the root password, accepts the EULA, selects the install disk and configures the management network. After first boot, confirm the build:

esxcli system version get

2. Configure the management network

List physical NICs and confirm link/speed:

esxcli network nic list

Inspect the VMkernel IPv4 configuration:

esxcli network ip interface ipv4 get

List the standard virtual switches and their uplinks:

esxcli network vswitch standard list

To set a static IPv4 address on the management VMkernel interface (vmk0):

esxcli network ip interface ipv4 set --interface-name=vmk0 --ipv4=192.0.2.21 --netmask=255.255.255.0 --type=static

Set the default gateway via the route table as needed, then verify connectivity with vmkping.

3. Set NTP (time synchronisation)

Accurate time is mandatory — certificates, logs and vCenter all depend on it. Point the host at your NTP servers and enable the service:

esxcli system ntp set -e 1 -s ntp1.example.sa

Confirm with esxcli system ntp get. Time skew between hosts is one of the most common causes of vCenter and vSAN problems.

4. Review storage and adapters

List storage adapters (HBAs, iSCSI, NVMe):

esxcli storage core adapter list

List mounted filesystems / datastores:

esxcli storage filesystem list

For multi-extent VMFS datastores, confirm the backing LUNs:

esxcli storage vmfs extent list

5. Manage software (VIBs) and patching

List installed software packages:

esxcli software vib list

Install a driver or patch from an offline depot bundle (the -d flag points to the full path of the depot ZIP):

esxcli software vib install -d /vmfs/volumes/datastore1/depot/VMware-driver-bundle.zip

Reboot after VIB changes that require it. For fleet-wide patching in production, drive this through vSphere Lifecycle Manager rather than per-host commands.

6. Maintenance mode and VM operations

Before patching or hardware work, place the host in maintenance mode:

esxcli system maintenanceMode set --enable true

Check the state, and exit when done:

esxcli system maintenanceMode get
esxcli system maintenanceMode set --enable false

List registered VMs and their VMIDs (useful for scripted power operations):

vim-cmd vmsvc/getallvms

If a VM is hung and unresponsive in the UI, find its World ID and terminate it gracefully → hard → force, in that order:

esxcli vm process list
esxcli vm process kill -t soft -w 123456

7. Deploy the vCenter Server Appliance (VCSA) from the CLI

vCenter ships as an appliance (VCSA). The CLI installer (vcsa-deploy) is on the VCSA ISO under vcsa-cli-installer/, with OS-specific binaries in lin64, win32 or mac. Copy a sample JSON template from vcsa-cli-installer/templates/ and fill in the target ESXi host (or existing vCenter), appliance name, network, root and SSO passwords, and deployment size. Keep all values in plain ASCII.

Step 1 — precheck the template (validates without deploying):

./vcsa-deploy install --precheck-only /path/to/embedded-vCSA.json

Step 2 — run the deployment:

./vcsa-deploy install --accept-eula --acknowledge-ceip /path/to/embedded-vCSA.json

To capture detailed logs to a chosen directory:

./vcsa-deploy install --accept-eula --acknowledge-ceip --log-dir=/var/log/vcsa-deploy /path/to/embedded-vCSA.json

The installer runs both deployment stages (deploy the appliance, then configure services) automatically when driven from a complete JSON template. When it finishes, log in to https://<vcsa-fqdn>/ui with the SSO administrator account and begin building your datacenter, clusters, HA/DRS and distributed switches.

8. Validate the build

Add hosts to vCenter, enable HA and DRS on the cluster, create datastores or a vSAN datastore, configure NTP and identity sources in vCenter, and confirm a backup integration point before placing production workloads. Document the as-built configuration.

Need help?

SKYLINE installs, configures, supports and troubleshoots VMware vSphere across Saudi Arabia. See our VMware vSphere service, browse the Cloud & Infrastructure category in our Marketplace, or contact us. For licensing strategy, read our guide on VMware after Broadcom.

SKYLINE Engineering

@skyline

The engineering team at SKYLINE Industrial Solutions. We publish field-tested guides drawn from real KSA and GCC deployments.

See author profile
SKYLINE engineering services

Need this implemented for you?

Reading is free — building it right takes a team. SKYLINE engineers ship Virtualization for Aramco vendors, banks, hospitals and government agencies across Saudi Arabia. Talk to us before you start.

Aramco Approved Contractor ISO 9001 · ISO 27001 SAMA CSF aligned NCA ECC ready 247+ KSA clients

Comments

0 total · 0 threads
Be the first to leave a comment.