Certainly, here are 50 ESXCLI commands for managing an ESXi host:
- List VMs on the Host:
esxcli vms vm list
- Power On a VM:
esxcli vms vm power on -v <VMID>
- Power Off a VM:
esxcli vms vm power off -v <VMID>
- Create a VMFS Datastore:
esxcli storage filesystem vmfs create -l <DatastoreName> -s <DatastoreSize> -p <StorageDevice>
- List Physical Network Adapters:
esxcli network nic list
- Configure VMKernel IP Address:
esxcli network ip interface ipv4 set -i <VMKernelName> -I <IPAddress> -N <SubnetMask> -t static
- Create a Port Group:
esxcli network vswitch standard portgroup add -v <vSwitchName> -p <PortGroupName>
- Check ESXi Version:
esxcli hardware platform get
- List Running Processes:
esxcli hardware cpu list
- List Storage Devices:
esxcli storage core device list
- Check Health Status of Physical NICs:
esxcli network nic get -n <NICName>
- List Datastores:
esxcli storage filesystem list
- Set NTP Server:
esxcli hardware clock set --year <Year> --month <Month> --day <Day> --hour <Hour> --minute <Minute> --second <Second>
- List Host VMkernel Interfaces:
esxcli network ip interface list
- Rescan Storage Adapters:
esxcli storage core adapter rescan -A
- Add a User to ESXi Host:
esxcli system account add -d <Username> -i <UserID> -p <Password>
- Check Firewall Status:
esxcli network firewall get
- Set DNS Configuration:
esxcli network ip dns search add --domain=<DomainName>
- List vSwitches:
esxcli network vswitch standard list
- Reboot ESXi Host:
reboot
- List VM Snapshots:
esxcli vms vm snapshot list -v <VMID>
- Clone a VM Snapshot:
esxcli vms vm snapshot clone -v <VMID> -s <SnapshotName> -n <NewSnapshotName>
- Remove a VM Snapshot:
esxcli vms vm snapshot remove -v <VMID> -s <SnapshotName>
- List Datastore Paths:
esxcli storage filesystem list -l
- Add a Static Route:
esxcli network ip route ipv4 add -n <DestinationNetwork> -g <GatewayIP>
- List System Services:
esxcli software vib list
- Install a VIB:
esxcli software vib install -v <VIBPath>
- List Running VMs:
esxcli vms vm list -q
- List Registered VMs:
esxcli vms vm list -r
- Get VM CPU Affinity:
esxcli vms vm get -v <VMID> -p cpuid
- List Host Services:
esxcli software vib list
- Set Syslog Configuration:
esxcli system syslog config set --loghost <SyslogServerIP>
- List USB Devices:
esxcli hardware usb list
- Add VM to vApp:
esxcli vms vm vapp add -v <VMID> -a <vAppName>
- Remove VM from vApp:
esxcli vms vm vapp remove -v <VMID> -a <vAppName>
- Create a VM on ESXi:
esxcli vms vm create -v <VMName> -l <DatastoreName> -t <VMTemplate>
- List Routed VMKernel Interfaces:
esxcli network ip interface ipv4 list -r
- Migrate VM to Different Datastore:
esxcli vms vm migration start -v <VMID> -d <DestinationDatastore>
- List Installed VIBs:
esxcli software vib list
- Enable/Disable SSH Access:
esxcli network firewall ruleset set -e true/false -r sshClient
- List VM Advanced Options:
esxcli vms vm advanced get -v <VMID>
- Set VM Advanced Option:
esxcli vms vm advanced set -v <VMID> -o <OptionName> -v <OptionValue>
- Check HBA Adapters:
esxcli storage core adapter list
- List Host Sensors:
esxcli hardware ipmi sel list
- Configure VM CPU Affinity:
esxcli vms vm set -v <VMID> -p cpuid -c <CPUs>
- List NFS Datastores:
esxcli storage nfs list
- List Datastore Paths:
esxcli storage filesystem list -l
- List iSCSI Software Adapters:
esxcli iscsi adapter list
- Discover iSCSI Targets:
esxcli iscsi adapter discovery sendtarget -a <iSCSITargetIP>
- List iSCSI Sessions:
esxcli iscsi session list