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.cfgA 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 get2. Configure the management network
List physical NICs and confirm link/speed:
esxcli network nic listInspect the VMkernel IPv4 configuration:
esxcli network ip interface ipv4 getList the standard virtual switches and their uplinks:
esxcli network vswitch standard listTo 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=staticSet 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.saConfirm 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 listList mounted filesystems / datastores:
esxcli storage filesystem listFor multi-extent VMFS datastores, confirm the backing LUNs:
esxcli storage vmfs extent list5. Manage software (VIBs) and patching
List installed software packages:
esxcli software vib listInstall 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.zipReboot 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 trueCheck the state, and exit when done:
esxcli system maintenanceMode get
esxcli system maintenanceMode set --enable falseList registered VMs and their VMIDs (useful for scripted power operations):
vim-cmd vmsvc/getallvmsIf 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 1234567. 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.jsonStep 2 — run the deployment:
./vcsa-deploy install --accept-eula --acknowledge-ceip /path/to/embedded-vCSA.jsonTo capture detailed logs to a chosen directory:
./vcsa-deploy install --accept-eula --acknowledge-ceip --log-dir=/var/log/vcsa-deploy /path/to/embedded-vCSA.jsonThe 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.
Comments
0 total · 0 threads