Vmware Vcap-Dca Cli Cheat Sheet v1.0
Vmware Vcap-Dca Cli Cheat Sheet v1.0
Modes:
a / A = append
I / I = insert
o / O = open new line
r / R = replace
$ end of line
dd delete line
VMware vSphere Command-Line Unterface (vCLI), Installs the vSphere SDK for Perl on
Windows or Linux
Local Console (VMware ESX or ESXi) esxcfg
VMware vSphere Management Assistant (vMA) vicfg
VMware vSphere PowerCLI
Some Service Console commands will not work on ESXi. For example esxcfg-vswif is replace with
vicfg-vmknic
In Lockdown mode (disables all direct root access to ESXi hosts) some commands are not possible
such as commands that support the –vihost option. The following commands cannot run against
vCenter and therefore not available in lockdown mode:
vicfg-snmp
vifs
vicfg-user
vicfg-cfgbackup
vihostupdate
vmkfstools
esxcli
vicfg-ipsec
Most of the commands can be used on VMware ESX(i) on the local console by using esxcfg- instead
of using vicfg- (vCLI and vMA).
Reboot host
vicfg-hostops <conn_options>
--operation reboot --force
vicfg-cfgbackup back up and restore the You can back up configuration data by
ESXi host configuration running vicfg-backup with the -s option.
data vicfg-cfgbackup <conn_options>
-s /tmp/ESX_181842_backup.txt
link an uplink
vicfg-vswitch –L <vmnic>
<vSwitch>
Enable CDP
Command Description Examples
vicfg-vswitch –B vSwitch0
Create switch
vicfg-vswitch -a vSwitch0
Create portgroup
vicfg-vswitch -add-pg iSCSI-1
vSwitch0
vDS
Enable SNMP
vicfg-snmp –server <hostname>
–username <username> –password
<password> –enable
EMC
esxcli nmp satp setdefaultpsp
–psp VMW_PSP_RR –satp
VMW_SATP_SYMM
vilogger Collect ESX/ESXi logs to Enables log collection for the testserver
the vMA vMA target using default values for
collection period, log rotation,
ESX logs collected: and log size.
messages vilogger enable –server
vmkernel testserver
vmksummary
vmkwarning Enable log collection for all vMA targets
hostd.log using default values for collection period,
vpxa.log log rotation,
vilogger enable
ESXi logs collected:
Messages diable vilogger
Hostd.log vilogger disable
Vpxa.log
Defaults:
collectionperiod =
10
maxfilesize = 5MB
numrotations = 5
vicfg-dns change/update DNS Specify the DNS server using the --dns
option and a comma‐separated list of
hosts, in order of
preference.
vicfg-dns <conn_options --dns
Command Description Examples
<dns1,dns2>
vicfg-nics Manages the ESX/ESXi List settings.
host’s NICs (uplink vicfg-nics -l
adapters).
Set vmnic2 to auto‐negotiate its speed and
duplex settings.
vicfg-nics <conn_options> -a
vmnic2
vicfg-ntp Specifies the NTP Run vicfg-ntp --start to start the service.
(Network Time Protocol) vicfg-ntp --start
server
Add NTP server.
vicfg-ntp -a 192.168.250.2
vicfg-route Lists or changes the add a route to 192.168.100.0 through
ESX/ESXi host’s route 192.168.0.1
entry (IP gateway) vicfg-route -a
192.168.100.0/24 192.168.0.1
Close a port
esxcfg-firewall –c
514,udp,out,syslog
Default 256MHz
das.slotmeminmb Defines the
maximum bound on
HA advanced attributes Description Examples
the memory slot size.
If this
option is used, the
slot size is the
smaller of this value
or the
maximum memory
reservation plus
memory overhead of
any powered-on
virtual machine in the
cluster.
das.usedefaultisolationaddress By default, VMware das.usedefaultisolationadd
HA uses the default ress = false
gateway of the
console network as
an isolation address.
This attribute
specifies whether or
not this default is
used (true|false).
das.failuredetectiontime Changes the default das.failuredetectiontime =
failure detection time 60000
for host
monitoring. The
default is 15000
milliseconds (15
seconds).
This is the time
period, when a host
has received no
heartbeats from
another host, that it
waits before
declaring
that host as failed.
das.isolationaddress[...] Sets the address to das.isolationaddress1 to
ping to determine if a das.isolationaddress10 =
host is isolated from <value>
the network. This
address is pinged
only when heartbeats
are
not received from any
other host in the
cluster. If not
specified, the default
gateway of the
management network
is used. This default
HA advanced attributes Description Examples
gateway has to be a
reliable address that
is available, so that
the host can
determine if it is
isolated from
the network. You can
specify multiple
isolation addresses
(up to 10) for the
cluster:
das.isolationaddressX
, where X =
1-10. Typically you
should specify one
per management
network. Specifying
too many addresses
makes isolation
detection take too
long.
das.failuredetectioninterval Changes the
heartbeat interval
among VMware HA
hosts. By
default, this occurs
every 1000
milliseconds (1
second).
das.preferredPrimaries Select the primary das.preferredPrimaries =
HA hosts 172.16.1.1,
172.16.1.2,172.16.1.3
This setting is
unsupported!
NOTE If you change the value of any of the following advanced attributes, you must disable and
then re-enable VMware HA before your changes take effect.
das.isolationaddress[...]
das.usedefaultisolationaddress
das.failuredetectiontime
das.failuredetectioninterval
das.isolationshutdowntimeout