ESXCLI

Fake SCSI Reservation on vSAN (for installing Nested ESXI on vSAN) – on each node
esxcli system settings advanced set -o /VSAN/FakeSCSIReservations -i 1

Enable Thin Swap on vSAN – on each node
esxcli system settings advanced set -o /VSAN/SwapThickProvisionDisabled -i 1

Network

List active TCP/IP connections (like netstat -an on linux)
esxcli network ip connection list

List ARP table entries
esxcli network ip neighbor list

Check TSO
esxcli network nic tso get

Show nic parameters
esxcli network nic list

Show NIC Stats (TX/RX – Dropped & Error)
esxcli network nic stats get -n vmnic0

System

Display the product name, version and build information
esxcli system version

vSAN

Enable Maintenance mode on vSAN node
esxcli system maintenanceMode set -e true|false -m ensureObjectAccessibility|evacuateAllData|noAction

VMs

Show VM World ID
esxcli vm process list

 

PowerCLI

Ignore Certificate Error
Set-PowerCLIConfiguration -InvalidCertificateAction ignore -confirm:$false

NTP setup
Connect-VIServer “vCenter FQDN -user “User” -password ‘PASSWD’
Get-VMHost | Add-VMHostNtpServer -NtpServer 192.168.20.5
Get-VMHost | Get-VMHostNtpServer
Get-VMhost | Get-VMHostService  | findstr ntp
Get-VMhost | Get-VmHostService | Where-Object {$_.key -eq “ntpd”} | Set-VMHostService -policy “on”
Get-VMHost | Get-VmHostService | Where-Object {$_.key -eq “ntpd”} | Start-VMHostService

Enable ESXi iSCSI Software Adapter
Get-VMHost | Get-VMHostStorage | Set-VMHostStorage -SoftwareIScsiEnabled $True

Build a custom ISO
Add-EsxSoftwareDepot C:\QLG-qcnic-6.5-6426856\QLG-qcnic-6.5-offline_bundle-6426856.zip
Add-EsxSoftwareDepot C:\VMware-VMvisor-Installer-6.5.0.update01-7967591.x86_64.zip
New-EsxImageProfile -CloneProfile ESXi-6.5U1-7967591 “ESXi-6.5U1-Custom” -vendor Custom
Get-EsxImageProfile

Get-EsxSoftwarePackage -SoftwareDepot zip:C:\QLG-qcnic-6.5-6426856\QLG-qcnic-6.5-offline_bundle-6426856.zip?index.xml

Name                     Version                        Vendor     Creation Date
—-                     ——-                        ——     ————-
qcnic                    1.0.4.0-1OEM.650.0.0.4598673   QLC        8/23/2017 12:…
qfle3f                   1.0.31.0-1OEM.650.0.0.4598673  QLC        8/21/2017 2:2…
qfle3i                   1.0.5.0-1OEM.650.0.0.4598673   QLC        8/21/2017 2:1…
qfle3                    1.0.55.0-1OEM.650.0.0.4240417  QLC        3/20/2017 11:…

Add-EsxSoftwarePackage -SoftwarePackage qcnic -ImageProfile ESXi-6.5U1-Custom
Add-EsxSoftwarePackage -SoftwarePackage qfle3f -ImageProfile ESXi-6.5U1-Custom
Add-EsxSoftwarePackage -SoftwarePackage qfle3i -ImageProfile ESXi-6.5U1-Custom
Add-EsxSoftwarePackage -SoftwarePackage qfle3 -ImageProfile ESXi-6.5U1-Custom

Export-EsxImageProfile -ImageProfile ESXi-6.5U1-Custom -ExportToIso -FilePath ESXi-6.5U1-Custom.iso

Export-EsxImageProfile -ImageProfile ESXi-6.5U1-Custom -ExportToBundle -FilePath ESXi-6.5U1-Custom.zip

 

 

Advanced Parameters

vSphere HA

das.usedefaultisolationaddress true|false
das.isolationaddress[0-9] “IP”

ESXI

Suppress Shell Waring on Web Client
UserVars.SuppressShellWarning 0|1

Modify AD “ESX Admins” group on a ESXi host
Config.HostAgent.plugins.hostsvc.esxAdminsGroup ESX Admins|”Or other group”

SRM

To remove snap-xx prefix  on recovered Datastores
storageProvider.fixRecoveredDatastoreNames false|true

Encrease SRM Rescan Timeout
storageProvider.hostRescanTimeoutSec 300|600

 

Others (to improve)

ESXi

vscsiStats
net-dvs
net-vdl2
net-vdr
vdq
esxtop
tcpdump-uw
pktcap-uw
esxcfg-*
summarize-dvfilter
vsipioctl
vdf / df -h
nc -z “ip” “port”
voma
vmkfstools
vmkload_mod
vm-support
esxcli software vib install -d “Path to zip”
esxcli software vib install -v “Path to vib”
esxcli software vib list
esxcli software acceptance set –level=
VMwareCertified|VMwareAccepted|PartnerSupported|CommunitySupported


VCSA

vimtop
top
dcli +interactive +skip-server-verification
service-control
fdisk -l
dmsetup ls
pvs|vgs|lvs
/opt/likewise/bin/domainjoin-cli join domain.com Domain_Administrator Password
/usr/lib/vmware-vmca/bin/certificate-manager
dir-cli
vecs-cli
certool
rvc
chsh -s /bin/bash
chsh -s /bin/appliancesh


/opt/vmware/vpostgres/current/bin/psql -U postgres

\connect VCDB
select * from VPX_DISABLED_METHODS;
delete from VPX_DISABLED_METHODS where entity_mo_id_val = ‘MO_ID’
service-control –stop vmware-vpxds
ervice-control –start vmware-vpxd

NSX
NSX Control Cluster
NSX Edge