0% found this document useful (0 votes)
36 views

ESXI Esxcli VSphere Command-Line Interface Reference

Uploaded by

he156249
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

ESXI Esxcli VSphere Command-Line Interface Reference

Uploaded by

he156249
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 100

vSphere Command-Line Interface Reference

https://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.vsphere.scripting.doc_50%2FGUID-522DB42D-
78C1-4DD3-8708-E0AAA22B82BC.html
The vSphere CLI command set allows you to run common system administration commands against vSphere systems
from an administration server of your choice.
Linux Installation: If you accepted the defaults during installation, you can find the installed software in the following
locations:

• vSphere CLI scripts: /usr/bin


• vSphere SDK for Perl utility applications: /usr/lib/vmware-vcli/apps
• vSphere SDK for Perl sample scripts: /usr/share/doc/vmware-vcli/samples

Windows Installation: vSphere CLI commands are installed in C:\Program Files\VMware\VMware vSphere CLI\bin by
default.
The vSphere CLI includes the commands listed below, as well as the resxtop and esxcli commands.

• For resxtop, see the documentation in the Resource Management Guide.


• For esxcli, see the online help. This command differs depending on the system you are running it on.

Contents
Table 1: vSphere CLI commands ............................................................................................................................................. 2
esxcli command Commands ................................................................................................................................................... 3
esxcli fcoe Commands ............................................................................................................................................................ 3
esxcli hardware Commands .................................................................................................................................................... 3
esxcli iscsi Commands ............................................................................................................................................................. 4
esxcli license Commands ...................................................................................................................................................... 11
esxcli network Commands .................................................................................................................................................... 12
esxcli software Commands ................................................................................................................................................... 20
esxcli storage Commands ..................................................................................................................................................... 26
esxcli system Commands ...................................................................................................................................................... 39
esxcli vm Commands ............................................................................................................................................................ 43
svmotion ............................................................................................................................................................................... 44
vicfg-advcfg - query and modify advanced VMkernel options. Use when instructed by Technical Support. ...................... 46
vicfg-authconfig - manage Active Directory authentication schemes. ................................................................................. 48
vicfg-cfgbackup - back up and restore ESXi host configurations .......................................................................................... 49
vicfg-dns - configure DNS properties .................................................................................................................................... 51
vicfg-dumppart - query, set, and scan for diagnostic partitions on an ESX/ESXi system ..................................................... 52
vicfg-hostops - perform host-related operations. ................................................................................................................ 53
vicfg-ipsec - configure IPsec properties ................................................................................................................................ 55
vicfg-iscsi - manage iSCSI storage. ........................................................................................................................................ 58
vicfg-module - enable configuration of VMkernel module options ..................................................................................... 64
vicfg-mpath35 - configure multipath settings for Fibre Channel or iSCSI LUNs ................................................................... 65
vicfg-mpath - display path information, change path state ................................................................................................. 66
vicfg-nas - manipulate NAS file systems on an ESX/ESXi host. ............................................................................................. 68
vicfg-nics - get information, set speed and duplex for ESX/ESXi physical NICs .................................................................... 69
vicfg-ntp - configure the NTP server ..................................................................................................................................... 71
vicfg-rescan - scan the LUNs ................................................................................................................................................. 72
vicfg-route - get and set routing information for the VMkernel .......................................................................................... 73
vicfg-scsidevs - display information about available LUNs. .................................................................................................. 74
vicfg-snmp - configure the SNMP service ............................................................................................................................. 76
vicfg-syslog - get and set syslog server configuration .......................................................................................................... 77
vicfg-user - manage users and groups .................................................................................................................................. 78
vicfg-vmknic - configure virtual network adapters ............................................................................................................... 80
vicfg-volume - Managing LVM snapshot or replica volumes. ............................................................................................... 83
vicfg-vswitch - create and configure virtual switches and port groups ................................................................................ 84
vifs - perform file system operations on remote hosts ........................................................................................................ 87
vihostupdate35 - manage software installation packages on a VMware Infrastructure 3.5 host using vSphere CLI 4.0 and
later. ...................................................................................................................................................................................... 89
vihostupdate - manage software installation packages on an ESX/ESXi host. ..................................................................... 90
vmkfstools - vSphere CLI for managing VMFS volumes........................................................................................................ 92
vmware-cmd - perform virtual machine operations ............................................................................................................ 95

To display usage information, click the command name in the Documentation column of Table 1.
Table 1: vSphere CLI commands

Documentation Description
esxcli command Lists descriptions of esxcli commands.
esxcli fcoe FCOE (Fibre Channel over Ethernet) comands
esxcli hardware Hardware namespace. Used primarily for extracting information about the current system setup.
esxcli iscsi iSCSI namespace for minitoring and managing hardware and software iSCSI.
esxcli license License management commands.
esxcli network Network namespace for managing virtual networking including virtual switches and VMkernel network
interfaces.
esxcli software Software namespace. Includes commands for managing and installing image profiles and VIBs.
esxcli storage Includes core storage commands and other storage management commands.
esxcli system System monitoring and management command.
esxcli vm Namespace for listing virtual machines and shutting them down forcefully.
svmotion Moves a virtual machine's configuration file and optionally its disks while the virtual machine is
running. Must run against a vCenter Server system.
vicfg-advcfg Performs advanced configuration including enabling and disabling CIM providers. Use this command
as instructed by VMware.
vicfg- Manages Active Directory authentication.
authconfig
vicfg-cfgbackup Backs up the configuration data of an ESXi system and restores previously saved configuration data.
vicfg-dns.pl Specifies an ESX/ESXi host's DNS (Domain Name Server) configuration.
vicfg-dumppart Manages diagnostic partitions.
vicfg-hostops Allows you to start, stop, and examine ESX/ESXi hosts and to instruct them to enter maintenance
mode and exit from maintenance mode.
vicfg-ipsec Supports setup of IPSec.
vicfg-iscsi Manages iSCSI storage.
vicfg-module Enables VMkernel options. Use this command with the options listed, or as instructed by VMware.
vicfg-mpath Displays information about storage array paths and allows you to change a path's state.
vicfg-mpath35 Configures multipath settings for Fibre Channel or iSCSI LUNs.
vicfg-nas Manages NAS file systems.
vicfg-nics Manages the ESX/ESXi host's NICs (uplink adapters).
vicfg-ntp Specifies the NTP (Network Time Protocol) server.
vicfg-rescan Rescans the storage configuration.
vicfg-route Lists or changes the ESX/ESXi host's route entry (IP gateway).
vicfg-scsidevs Finds available LUNs.
vicfg-snmp Manages the Simple Network Management Protocol (SNMP) agent.
vicfg-syslog Specifies the syslog server and the port to connect to that server for ESXi hosts.
vicfg-user Creates, modifies, deletes, and lists local direct access users and groups of users.
vicfg-vmknic Adds, deletes, and modifies virtual network adapters (VMkernel NICs).
vicfg-volume Supports resignaturing a VMFS snapshot volume and mounting and unmounting the snapshot volume.
vicfg-vswitch Adds or removes virtual switches or vNetwork Distributed Switches, or modifies switch settings.
vifs.pl Performs file system operations such as retrieving and uploading files on the remote server.
vihostupdate Manages updates of ESX/ESXi hosts. Use vihostupdate35 for ESXi 3.5 hosts.
vihostupdate35 Manages updates of ESX/ESXi version 3.5 hosts.
vmkfstools Creates and manipulates virtual disks, file systems, logical volumes, and physical storage devices on
ESX/ESXi hosts.
vmware-cmd Performs virtual machine operations remotely. This includes, for example, creating a snapshot,
powering the virtual machine on or off, and getting information about the virtual machine.

esxcli command Commands

Command Description Options Help


This command will output a detailed XML description of all the esxcli --help | -h
esxcli command
commands on this system as well as a description of each and details on all Show the help
getdetails
the commands parameters. message.
--help | -h
esxcli command This command will list all of the esxcli commands with their namespace, Show the help
list object, command name and description. message.

esxcli fcoe Commands

Command Description Options Help


fcoe adapter --help | -h
list
List FCOE-capable CNA devices. Show the help message.
--help | -h
Show the help message.
fcoe nic Disable rediscovery of FCOE storage on behalf of an FCOE-capable --nic-name | -n
disable CNA upon next boot. The CNA adapter name
(vmnicX)
--help | -h
Show the help message.
fcoe nic Initiate FCOE adapter discovery on behalf of an FCOE-capable --nic-name | -n
discover CNA. The CNA adapter name
(vmnicX)
--help | -h
fcoe nic list List FCOE-capable CNA devices. Show the help message.
fcoe nic --help | -h
restore
Restore FCOE initiators during reboot. Show the help message.

esxcli hardware Commands

Command Description Options Help


hardware --help | -h
bootdevice list
List the boot device order, if available, for this host. Show the help message.
--help | -h
hardware clock get Disply the current hardware clock time. Show the help message.
--day | -d
Day
--help | -h
Show the help message.
--hour | -H
Hour
Set the hardware clock time. Any missing parameters --min | -m
hardware clock set
will default to the current time. Minute
--month | -M
Month
--sec | -s
Second
--year | -y
Year
--cpu | -c
The ID of the CPU to query for
hardware cpu cpuid
get
Get CPUID fields for the given CPU. CPUID data
--help | -h
Show the help message.
hardware cpu --help | -h
global get
Get properties that are global to all CPUs. Show the help message.
--help | -h
Show the help message.
hardware cpu --hyperthreading | -t
global set
Set properties that are global to all CPUs.
Enable or disable
hyperthreading
--help | -h
hardware cpu list List all of the CPUs on this host. Show the help message.
hardware memory --help | -h
get
Get information about memory. Show the help message.
--help | -h
hardware pci list List all of the PCI devices on this host. Show the help message.
hardware platform --help | -h
get
Get information about the platform Show the help message.

esxcli iscsi Commands

Command Description Options Help


--adapter | -A
The iSCSI adapter name.
--direction | -d
Get the iSCSI CHAP authentication for the iSCSI The iSCSI CHAP authentication
iscsi adapter auth chap get
Host Bus Adapter. direction ( [uni, mutual])
--help | -h
Show the help message.
--adapter | -A
The iSCSI adapter name.
--authname | -N
Set the iSCSI CHAP authentication for the iSCSI The iSCSI CHAP authentication
iscsi adapter auth chap set
Host Bus Adapter. name
--default | -D
Resetting iSCSI CHAP
authenthication setting to
default.
--direction | -d
The iSCSI CHAP authentication
direction ( [uni, mutual])
--help | -h
Show the help message.
--level | -l
The iSCSI CHAP authentication
level ( [prohibited, discouraged,
preferred, required])
--secret | -S
The iSCSI CHAP authentication
secret
--adapter | -A
iscsi adapter capabilities List the iSCSI details for the iSCSI Host Bus The iSCSI adapter name.
get Adapter. --help | -h
Show the help message.
--adapter | -A
iscsi adapter discovery Do the iSCSI Discovery for the iSCSI Host Bus The iSCSI adapter name.
rediscover Adapter. --help | -h
Show the help message.
--adapter | -A
The iSCSI adapter name.
--address | -a
iscsi adapter discovery
Add a sendtarget address The iSCSI sendtarget address:
sendtarget add
<ip/dns[:port]>
--help | -h
Show the help message.
--adapter | -A
The iSCSI adapter name.
--address | -a
The iSCSI sendtarget address:
iscsi adapter discovery Get iSCSI CHAP authentication on a sendtarget <ip/dns[:port]>
sendtarget auth chap get address --direction | -d
The iSCSI authentication
direction ( [uni, mutual])
--help | -h
Show the help message.
--adapter | -A
The iSCSI adapter name.
--address | -a
The iSCSI sendtarget address:
<ip/dns[:port]>
--authname | -N
The iSCSI authentication name
--default | -D
Resetting iSCSI authentication
setting to default.
iscsi adapter discovery Set iSCSI CHAP authentication on a sendtarget --direction | -d
sendtarget auth chap set address The iSCSI authentication
direction ( [uni, mutual])
--help | -h
Show the help message.
--inherit | -I
Inheriting iSCSI authentication
setting from parent.
--level | -l
The iSCSI authentication level (
[prohibited, discouraged,
preferred, required])
--secret | -S
The iSCSI authentication secret
--adapter | -A
iscsi adapter discovery The iSCSI adapter name.
sendtarget list
List sendtarget addresses --help | -h
Show the help message.
--adapter | -A
The iSCSI adapter name.
--address | -a
iscsi adapter discovery
Get iSCSI parameter on a sendtarget address The iSCSI sendtarget address:
sendtarget param get
<ip/dns[:port]>
--help | -h
Show the help message.
--adapter | -A
The iSCSI adapter name.
--address | -a
The iSCSI sendtarget address:
<ip/dns[:port]>
--default | -D
Resetting iSCSI parameter
Set the iSCSI parameter for the iSCSI setting to default.
iscsi adapter discovery
--help | -h
sendtarget param set Sendtarget. Show the help message.
--inherit | -I
Inheriting iSCSI parameter
setting from parent.
--key | -k
The iSCSI parameter key
--value | -v
The iSCSI parameter value
--adapter | -A
The iSCSI adapter name.
--address | -a
iscsi adapter discovery
Remove a sendtarget address The iSCSI sendtarget address:
sendtarget remove
<ip/dns[:port]>
--help | -h
Show the help message.
--adapter | -A
The iSCSI adapter name.
--address | -a
The iSCSI target address:
iscsi adapter discovery
statictarget add Add a static target address <ip/dns[:port]>
--help | -h
Show the help message.
--name | -n
The iSCSI target name.
--adapter | -A
iscsi adapter discovery The iSCSI adapter name.
statictarget list
List static target addresses --help | -h
Show the help message.
--adapter | -A
The iSCSI adapter name.
--address | -a
iscsi adapter discovery The iSCSI target address:
statictarget remove
Remove a static target
<ip/dns[:port]>
--help | -h
Show the help message.
--name | -n
The iSCSI target name.
--adapter | -A
iscsi adapter discovery Get the iSCSI adapter discovery status for the The iSCSI adapter name.
status get iSCSI Host Bus Adapter. --help | -h
Show the help message.
--adapter | -A
The iSCSI adapter name.
--file | -f
Validate the iSCSI firmware for the iSCSI Host Path to the firmware file to
iscsi adapter firmware get
Bus Adapter. retrieve information from.
--help | -h
Show the help message.
--adapter | -A
The iSCSI adapter name.
--file | -f
Upload the iSCSI firmware for the iSCSI Host Path to the firmware file to
iscsi adapter firmware set
Bus Adapter. download.
--help | -h
Show the help message.
--adapter | -A
List the iSCSI information for the iSCSI Host The iSCSI adapter name.
iscsi adapter get
Bus Adapter. --help | -h
Show the help message.
--adapter | -A
List all the iSCSI Host Bus Adapters on the The iSCSI adapter name.
iscsi adapter list
system. --help | -h
Show the help message.
--adapter | -A
Get the iSCSI parameters for the iSCSI Host The iSCSI adapter name.
iscsi adapter param get
Bus Adapter. --help | -h
Show the help message.
--adapter | -A
The iSCSI adapter name.
--default | -D
Resetting iSCSI parameter
setting to default.
--help | -h
Set the iSCSI parameter for the iSCSI Host Bus Show the help message.
iscsi adapter param set
Adapter. --key | -k
The iSCSI initiator parameter
key.
--value | -v
The iSCSI initiator parameter
value.
--adapter | -A
The iSCSI adapter name.
--alias | -a
Set the iSCSI name and alias for the iSCSI Host The iSCSI initiator alias.
iscsi adapter set
Bus Adapter. --help | -h
Show the help message.
--name | -n
The iSCSI initiator name.
--adapter | -A
The iSCSI adapter name.
--help | -h
iscsi adapter target list List iSCSI targets. Show the help message.
--name | -n
The iSCSI target name.
--adapter | -A
The iSCSI adapter name.
--address | -a
The iSCSI target address:
<ip/dns[:port]>
--direction | -d
The iSCSI authentication
iscsi adapter target portal direction ( [uni, mutual])
auth chap get
Get iSCSI CHAP authentication on a target --help | -h
Show the help message.
--method | -m
The iSCSI authentication
method ( [chap])
--name | -n
The iSCSI target name:
<iqn/eui>
--adapter | -A
The iSCSI adapter name.
--address | -a
The iSCSI target address:
<ip/dns[:port]>
--authname | -N
The iSCSI authentication name
--default | -D
Resetting iSCSI authentication
setting to default.
--direction | -d
The iSCSI authentication
direction ( [uni, mutual])
iscsi adapter target portal Set the iSCSI CHAP authentication for the iSCSI --help | -h
auth chap set Target. Show the help message.
--inherit | -I
Inheriting iSCSI authentication
setting from parent.
--level | -l
The iSCSI authentication level (
[prohibited, discouraged,
preferred, required])
--name | -n
The iSCSI target name:
<iqn/eui>
--secret | -S
The iSCSI authentication
password
--adapter | -A
The iSCSI adapter name.
iscsi adapter target portal --help | -h
list
List iSCSI target portals. Show the help message.
--name | -n
The iSCSI target name.
--adapter | -A
The iSCSI adapter name.
--address | -a
The iSCSI target address:
iscsi adapter target portal <ip/dns[:port]>
param get
Get iSCSI parameter on a target --help | -h
Show the help message.
--name | -n
The iSCSI target name:
<iqn/eui>
--adapter | -A
The iSCSI adapter name.
--address | -a
The iSCSI target address:
<ip/dns[:port]>
--default | -D
Resetting iSCSI parameter
setting to default.
--help | -h
iscsi adapter target portal Show the help message.
param set
Set the iSCSI parameter for the iSCSI Target. --inherit | -I
Inheriting iSCSI parameter
setting from parent.
--key | -k
The iSCSI parameter key
--name | -n
The iSCSI target name:
<iqn/eui>
--value | -v
The iSCSI parameter value
--help | -h
iscsi ibftboot get Get iSCSI IBFT Boot details. Show the help message.
Import iSCSI target configuration from iBFT to
ESX iSCSI initiators. The boot target recorded --help | -h
iscsi ibftboot import
in iBFT is added to all the eligible 'dependent' Show the help message.
iSCSI adapters.
--adapter | -A
iscsi logicalnetworkportal The iSCSI adapter name.
list
List Logical Network Portals for iSCSI Adapter --help | -h
Show the help message.
--adapter | -A
The iSCSI adapter name.
--help | -h
iscsi networkportal add Add a network portal for iSCSI adapter Show the help message.
--nic | -n
The iSCSI network portal
(bound vmknic)
--adapter | -A
The iSCSI adapter name.
--help | -h
iscsi networkportal
Get iSCSI network portal ip configuration Show the help message.
ipconfig get
--nic | -n
The iSCSI network portal
(vmknic)
--adapter | -A
The iSCSI adapter name.
--dns1 | -1
The iSCSI network portal
primary DNS address
--dns2 | -2
The iSCSI network portal
iscsi networkportal
ipconfig set
Set iSCSI network portal IP configuration secondary DNS address
--gateway | -g
The iSCSI network portal
gateway address
--help | -h
Show the help message.
--ip | -i
The iSCSI network portal IP
address
--nic | -n
The iSCSI network portal
(vmknic)
--subnet | -s
The iSCSI network portal
subnet mask
--adapter | -A
The iSCSI adapter name.
iscsi networkportal list List Network Portal for iSCSI Adapter --help | -h
Show the help message.
--adapter | -A
The iSCSI adapter name.
--force | -f
The force flag (force removal of
iSCSI vmknic when sessions are
iscsi networkportal remove Remove a network portal for iSCSI adapter active using it)
--help | -h
Show the help message.
--nic | -n
The iSCSI network portal
(bound vmknic)
--adapter | -A
iscsi physicalnetworkportal The iSCSI adapter name.
list
List Physical Network Portal for iSCSI Adapter --help | -h
Show the help message.
--adapter | -A
The iSCSI adapter name.
--help | -h
iscsi physicalnetworkportal Get network parameters on a Physical Show the help message.
param get Network Portal (vmnic) --nic | -n
The physical network portal
name: <vmnic>
--adapter | -A
The iSCSI adapter name.
--enabled | -e
Enable or disable a Physical
Network Portal option
iscsi physicalnetworkportal Set network parameter on a Physical Network --help | -h
param set Portal Show the help message.
--nic | -n
The physical network portal
name: <vmnic>
--option | -o
The network parameter option
--adapter | -A
The iSCSI adapter name.
--help | -h
iscsi plugin list List IMA plugins. Show the help message.
--plugin | -p
The IMA plugin file name.
--adapter | -A
The iSCSI adapter name.
--help | -h
Show the help message.
iscsi session add Login sessions on current iSCSI configuration. --isid | -s
The isid of a session to
duplicate for login.
--name | -n
The iSCSI target name.
--adapter | -A
The iSCSI adapter name.
--cid | -c
The iSCSI connection
identifier(CID).
iscsi session connection --help | -h
list
List iSCSI connections. Show the help message.
--isid | -s
The iSCSI session
identifier(ISID).
--name | -n
The iSCSI target name.
--adapter | -A
The iSCSI adapter name.
--help | -h
Show the help message.
iscsi session list List iSCSI Sessions. --isid | -s
The iSCSI session identifier.
--name | -n
The iSCSI target name.
--adapter | -A
The iSCSI adapter name.
--help | -h
Show the help message.
--isid | -s
iscsi session remove Logout sessions on current iSCSI configuration. The isid of a session to
duplicate for login.
--name | -n
The name of the target to login
to.
--help | -h
iscsi software get Software iSCSI information. Show the help message.
--enabled | -e
Enable or disable the module.
iscsi software set Enable or disable software iSCSI. --help | -h
Show the help message.

esxcli license Commands

Command Description Options Help


--asset | -a
License asset identifier that uniquely
identifies the module to be licensed.
--blob | -b
Base64 encoded blob of licensing data
to activate the license asset with.
Updates the license for an OEM or a third party module Mutually exclusive with the --key
installed on the ESX host. The command writes a license parameter.
license --force | -f
oem update
key or a base64 encoded blob of licensing data to a file If set this flag will cause the license
and then executes a script provided by the module asset specific licensing data already
vendor that activates the module license. existing to be overwritten with the one
provided with either the --key or the --
blob parameters.
--help | -h
Show the help message.
--key | -k
License key to activate the license asset
with. Mutually exclusive with the --blob
parameter.

esxcli network Commands

Command Description Options Help


network Get all fence switch info --help | -h
fence list on the system. Show the help message.
--fence-id | -f
network Get all fence network The fence id used to retrieve fence info.
fence --help | -h
network bte
bridge table entries Show the help message.
list information --vds-name | -s
The vds name used to retrieve fence info.
--fence-id | -f
The fence id used to retrieve fence info.
network
Get all fence network info --help | -h
fence
network list on the vds. Show the help message.
--vds-name | -s
The vds name used to retrieve fence info.
--fence-id | -f
network The fence id used to retrieve fence info.
fence Get all fence port info on --help | -h
network port the fence network. Show the help message.
list --vds-name | -s
The vds name used to retrieve fence info.
network --help | -h
firewall get
Get the firewall status. Show the help message.
network
Load firewall module and --help | -h
firewall
load rulesets configuration. Show the help message.

network
Load ruleset configuration --help | -h
firewall
refresh for firewall. Show the help message.

--help | -h
network Show the help message.
firewall Add allowed ip
--ip-address | -i
ruleset address/range to the
allowedip
Allowed ip address/range for the ruleset.
ruleset ruleset. --ruleset-id | -r
add
The label of the ruleset.
network --help | -h
firewall
list allowed ip addresses Show the help message.
ruleset
for rulesets. --ruleset-id | -r
allowedip
list The label of the ruleset.
--help | -h
network Show the help message.
firewall Remove allowed ip
--ip-address | -i
ruleset address/range from the
allowedip
Allowed ip address/range for the ruleset.
ruleset. --ruleset-id | -r
remove
The label of the ruleset.
--help | -h
network
List the rulesets in Show the help message.
firewall
firewall. --ruleset-id | -r
ruleset list
List configuration for specfic ruleset
network --help | -h
List the rules of each
firewall Show the help message.
ruleset rule ruleset in firewall. --ruleset-id | -r
list List rules for specfic ruleset
--allowed-all | -a
Set to true to allowed all ip, set to false to use allowed ip list.
--enabled | -e
network Set firewall ruleset status
Set to true to enable ruleset, set to false to disable it.
firewall (allowedAll flag and --help | -h
ruleset set enabled status). Show the help message.
--ruleset-id | -r
The label of the ruleset.
--default-action | -d
Set to true to set defaultaction PASS, set to false to DROP.
network Set firewall enabled status --enabled | -e
firewall set and default action. Set to true to enable the firewall, set to false to disable the firewall.
--help | -h
Show the help message.
network
Allow unload firewall --help | -h
firewall
unload module. Show the help message.

--help | -h
network ip
List active TCP/IP Show the help message.
connection
connections --type | -t
list
Connection type : [ip, tcp, udp, all]
Add a search domain to
--domain | -d
network ip the list of domains to be
The string name of a domain to add to the list of search domains.
dns search searched when trying to --help | -h
add resolve an host name on Show the help message.
the ESXi host.
List the search domains
network ip currently configured on
--help | -h
dns search the ESXi host in the order
list
Show the help message.
in which they will be used
when searching.
Remove a search domain --domain | -d
network ip from the list of domains to The string name of a domain to remove from the list of search
dns search be searched when trying domains.
remove to resolve an host name --help | -h
on the ESXi host. Show the help message.
--help | -h
Add a new DNS server to
network ip Show the help message.
the end of the list of DNS --server | -s
dns server
add servers to use for this ESXi The IP address (v4 or v6) of the DNS server to add to the DNS server
host. list.
Print a list of the DNS
network ip server currently
--help | -h
dns server configured on the system
list Show the help message.
in the order in which they
will be used.
Remove a DNS server --all | -a
network ip
from the list of DNS --help | -h
dns server
remove servers to use for this ESXi Show the help message.
host. --server | -s

network ip --help | -h
get
Get global IP settings Show the help message.
network ip Add a new VMkernel --help | -h
interface network interface. Show the help message.
add --interface-name | -i
The name of the VMkernel network interface to create. This name
must be in the form vmkX, where X is a number 0-99
--mac-address | -M
Set the MAC address for the newly created VMkernel network
interface.
--mtu | -m
Set the MTU setting for a given VMkernel network interface on
creation
--portgroup-name | -p
The name of the port group to add this VMkernel network interface
to. This option is required.
--help | -h
network ip Get IPv4 settings for Show the help message.
interface VMkernel network --interface-name | -i
ipv4 get interfaces. The name of the VMkernel network interface to limit the output of
this command to.
--help | -h
Show the help message.
--interface-name | -i
The name of the VMkernel network interface to set IPv4 settings
for. This name must be an interface listed in the interface list
command.
--ipv4 | -I
The static IPv4 address for this interface.
network ip Configure IPv4 setting for --netmask | -N
interface a given VMkernel network The static IPv4 netmask for this interface.
ipv4 set interface. --peer-dns | -P
A boolean value to indicate if the system should use the DNS
settings published via DHCP for this interface.
--type | -t
IPv4 Address type : dhcp: Use DHCP to aquire IPv4 setting for this
interface. none: Remove IPv4 settings form this interface. static: Set
Static IPv4 information for this interface. Requires --ipv4 and --
netmask options.
--help | -h
Show the help message.
--interface-name | -i
network ip Add a static IPv6 address The name of the VMkernel network interface to add a static IPv6
interface
to a given VMkernel address to. This name must be an interface listed in the interface
ipv6 address
add network interface. list command.
--ipv6 | -I
The IPv6 address to add to the given VMkernel network interface.
This must be in X:X:X::/X format

network ip This command will list all


interface of the IPv6 addresses --help | -h
ipv6 address currently assigned to the Show the help message.
list
system
--help | -h
Show the help message.
--interface-name | -i
network ip Remove an IPv6 address The name of the VMkernel network interface to remove an IPv6
interface address from. This name must be an interface listed in the interface
ipv6 address from a given VMkernel
remove network interface. list command.
--ipv6 | -I
The IPv6 address to remove from the given VMkernel network
interface. This must be in X:X:X::/X format
Get IPv6 settings for
--help | -h
VMkernel network
network ip Show the help message.
interfaces. This does not --interface-name | -n
interface
ipv6 get include the IPv6 addresses The name of the VMkernel network interface to limit the output of
which can be found in the this command to.
listipv6 command
--enable-dhcpv6 | -d
Setting this value to true will enable DHCPv6 on this interface and
attempt to aquire an IPv6 address from the network
--enable-router-adv | -r
Setting this value to true will enable IPv6 Router Advertised IPv6
addresses to be added to this interface from any routers
Configure IPv6 settings for broadcasting on the local network.
network ip --help | -h
interface a given VMkernel network
ipv6 set
Show the help message.
interface. --interface-name | -i
The name of the VMkernel network interface to set IPv6 settings
for. This name must be an interface listed in the interface list
command.
--peer-dns | -P
A boolean value to indicate if the system should use the DNS
settings published via DHCPv6 for this interface.
This command will list the
network ip
VMkernel network --help | -h
interface
list interfaces currently Show the help message.
known to the system.
--help | -h
network ip Remove a new VMkernel Show the help message.
interface network interface from --interface-name | -i
remove the ESXi host. The name of the VMkernel network interface to remove. This name
must be in the form vmkX, where X is a number 0-99
--enabled | -e
Set to true to enable the interface, set to false to disable it.
--help | -h
network ip This command sets the
Show the help message.
interface enabled status and MTU --interface-name | -i
set size of a given IP interface The name of the interface to apply the configurations.
--mtu | -m
The MTU size of the IP interface.
--help | -h
network ip
Show the help message.
neighbor List ARP table entries --version | -v
list
IP version : [4, 6, all]
--help | -h
network ip Show the help message.
set
Update global IP settings --ipv6-enabled | -e
Enable or disable IPv6 (Reboot Required)
--help | -h
Show the help message.
network nic Bring down the specified --nic-name | -n
down network device. The name of the NIC to configured. This must be one of the cards
listed in the nic list command.
--help | -h
Get the generic Show the help message.
network nic --nic-name | -n
get
configuration of a network
device The name of the NIC to configured. This must be one of the cards
listed in the nic list command.
This command will list the
network nic Physical NICs currently --help | -h
list installed and loaded on Show the help message.
the system.
--auto | -a
Set the speed and duplexity settings to autonegotiate.
--duplex | -D
The duplex to set this NIC to. Acceptable values are : [full, half]
--help | -h
Show the help message.
--message-level | -l
Sets the driver message level. Meaning differ per driver.
--nic-name | -n
The name of the NIC to configured. This must be one of the cards
listed in the nic list command.
--phy-address | -P
Set the PHY address of the device
--port | -p
Selects device port. Available device ports are aui: Select aui as the
device port bnc: Select bnc as the device port fibre: Select mii as
Set the general options for
network nic the device port mii: Select mii as the device port tp: Select tp as the
set
the specified ethernet
device port
device. --speed | -S
The speed to set this NIC to. Acceptable values are : [10, 100, 1000,
10000]
--transceiver-type | -t
Selects transeiver type. Currently only internal and external can be
specified, in the future future types might be added. Available
transeiver types are external: Set the transceiver type to external
internal: Set the transceiver type to internal
--wake-on-lan | -w
Sets Wake-on-LAN options. Not all devices support this. The
argument to this option is a string of characters specifying which
options to enable. p Wake on phy activity u wake on unicast
messages m Wake on multicast messages b wake on broadcast
messages a Wake on ARP g Wake on MagicPacket(tm) s Enable
SecureOn(tm) password for MagicPacket(tm)
--help | -h
Show the help message.
network nic Bring up the specified --nic-name | -n
up network device. The name of the NIC to configured. This must be one of the cards
listed in the nic list command.
List the VMware vSphere --help | -h
network
Distributed Switch Show the help message.
vswitch dvs
currently configured on --vds-name | -v
vmware list
the ESXi host. Limit the output of this command to only vDS with the given name.
--help | -h
Show the help message.
--ports | -P
The number of ports to to give this newly created virtual switch.
network Add a new virtual switch Maximum ports per virtual switch is 4096. If no value is given the
vswitch to the ESXi networking
standard add
default value(128) is used. The number of ports is limited by the
system. number of already allocated ports on the host. The system wide
port count cannot be greater than 4608.
--vswitch-name | -v
The name of the virtual switch to create.
network List the virtual switches --help | -h
vswitch current on the ESXi host. Show the help message.
standard --vswitch-name | -v
list Limit the output of this command to only virtual switches with the
given name.

network --help | -h
vswitch Get the failover policy Show the help message.
standard settings governing the --vswitch-name | -v
policy given virtual switch The name of the virtual switch to use when fetching the switch
failover get failover policy.
--active-uplinks | -a
Configure the list of active adapters and their failover order. This
list must be a comma seperated list of values with the uplink name
and no spaces. Example: --active-
uplinks=vmnic0,vmnic3,vmnic7,vmnic1
--failback | -b
Configure whether a NIC will be used immediately when it comes
back in service after a failover
--failure-detection | -f
Set the method of determining how a network outage is detected.
beacon: Detect failures based on active beaconing to the vswitch
link: Detect failures based on the NIC link state
--help | -h
Show the help message.
network --load-balancing | -l
vswitch Set the load balancing policy for this policy. This can be one of the
Configure the Failover
standard
policy for a virtual switch. following options: explicit: Always use the highest order uplink from
policy
failover set the list of active adapters which pass failover criteria. iphash: Route
based on hashing the src and destination IP addresses mac: Route
based on the MAC address of the packet source. portid: Route
based on the originating virtual port ID.
--notify-switches | -n
Indicate whether to send a notification to physical switches on
failover
--standby-uplinks | -s
Configure the list of standby adapters and their failover order. This
list must be a comma seperated list of values with the uplink name
and no spaces. Example: --standby-
uplinks=vmnic2,vmnic4,vmnic8,vmnic6,vmnic11
--vswitch-name | -v
The name of the virtual switch to use when configuring the switch
failover policy.

network --help | -h
vswitch Get the Security Policy Show the help message.
standard governing the given virtual --vswitch-name | -v
policy switch. The name of the virtual switch to use when fetching the network
security get security policy.
--allow-forged-transmits | -f
Allow ports on the virtual switch to send packets with forged
source information.
--allow-mac-change | -m
network Allow ports on the virtual switch to change their MAC address.
vswitch Set the security policy for --allow-promiscuous | -p
standard
policy a given virtual switch Allow ports on the virtual switch to enter promiscuous mode.
security set --help | -h
Show the help message.
--vswitch-name | -v
The name of the virtual switch to use when setting the switch
security policy.
network --help | -h
vswitch
Get the shaping policy Show the help message.
standard settings for the given --vswitch-name | -v
policy The name of the virtual switch to use when fetching the switch
shaping get
virtual switch
shaping policy.
--avg-bandwidth | -b
The averge bandwidth allowed for this shaping policy. This value is
in Kbps (1 Kbps = 1000 bits/s)
--burst-size | -t
The largest burst size allowed for this shaping policy. This value is in
Kib (1 Kib = 1024 bits)
--enabled | -e
network Indicate whether to enable traffic shaping on this policy. If this is
vswitch Set the shaping policy
true then the --avg-bandwidth, --peak-bandwidth and --burst-size
standard settings for the given
policy options are required.
virtual switch --help | -h
shaping set
Show the help message.
--peak-bandwidth | -k
The peak bandwidth allowed for this shaping policy. This value is in
Kbps (1 Kbps = 1000 bits/s)
--vswitch-name | -v
The name of the virtual switch to use when setting the switch
shaping policy.
--help | -h
network Show the help message.
vswitch Allows the addition of a
--portgroup-name | -p
standard standard port group to a
portgroup
The name of the port group to add
virtual switch. --vswitch-name | -v
add
The virtual switch to add the port group to.
network
vswitch List all of the port groups --help | -h
standard
portgroup currently on the system. Show the help message.
list
network --help | -h
vswitch Get the network failover Show the help message.
standard --portgroup-name | -p
portgroup
policy settings governing
policy the given port group The name of the port group to use when fetching the port group
failover get failover policy.
--active-uplinks | -a
Configure the list of active adapters and their failover order. This
list must be a comma seperated list of values with the uplink name
and no spaces. Example: --active-
uplinks=vmnic0,vmnic3,vmnic7,vmnic1
--failback | -b
Configure whether a NIC will be used immediately when it comes
back in service after a failover
--failure-detection | -f
network Configure the Failover
vswitch Set the method of determining how a network outage is detected.
policy for a port group.
standard beacon: Detect failures based on active beaconing to the vswitch
portgroup
These setting may
link: Detect failures based on the NIC link state
policy potentially override virtual --help | -h
failover set switch settings. Show the help message.
--load-balancing | -l
Set the load balancing policy for this policy. This can be one of the
following options: explicit: Always use the highest order uplink from
the list of active adapters which pass failover criteria. iphash: Route
based on hashing the src and destination IP addresses mac: Route
based on the MAC address of the packet source. portid: Route
based on the originating virtual port ID.
--notify-switches | -n
Indicate whether to send a notification to physical switches on
failover
--portgroup-name | -p
The name of the port group to set failover policy for.
--standby-uplinks | -s
Configure the list of standby adapters and their failover order. This
list must be a comma seperated list of values with the uplink name
and no spaces. Example: --standby-
uplinks=vmnic2,vmnic4,vmnic8,vmnic6,vmnic11
--use-vswitch | -u
Reset all values for this policy to use parent virtual switch's settings
instead of overriding the settings for the port group. Using this in
conjunction with other settings will first reset all of the fields to use
the virtual switch setting and then apply the other options after the
reset.
network --help | -h
vswitch Get the Security Policy Show the help message.
standard --portgroup-name | -p
portgroup
governing the given port
policy group. The name of the port group to use when fetching the network
security get security policy.
--allow-forged-transmits | -f
Allow ports on the virtual switch to send packets with forged
source information.
--allow-mac-change | -m
Allow ports on the virtual switch to change their MAC address.
--allow-promiscuous | -o
network Allow ports on the virtual switch to enter promiscuous mode.
vswitch --help | -h
standard Set the security policy for Show the help message.
portgroup a given port group --portgroup-name | -p
policy
security set
The name of the port group to set security policy for.
--use-vswitch | -u
Reset all values for this policy to use parent virtual switch's settings
instead of overriding the settings for the port group. Using this in
conjunction with other settings will first reset all of the fields to use
the virtual switch setting and then apply the other options after the
reset.
network --help | -h
vswitch Get the network shaping Show the help message.
standard --portgroup-name | -p
portgroup
policy settings governing
policy the given port group The name of the port group to use when fetching the port group
shaping get shaping policy.
--avg-bandwidth | -b
The averge bandwidth allowed for this shaping policy. This value is
in Kbps (1 Kbps = 1000 bits/s)
--burst-size | -t
The largest burst size allowed for this shaping policy. This value is in
Kib (1 Kib = 1024 bits)
network --enabled | -e
vswitch Set the shaping policy Indicate whether to enable traffic shaping on this policy. If this is
standard
portgroup settings for the given port true then the --avg-bandwidth, --peak-bandwidth and --burst-size
policy group options are required.
shaping set --help | -h
Show the help message.
--peak-bandwidth | -k
The peak bandwidth allowed for this shaping policy. This value is in
Kbps (1 Kbps = 1000 bits/s)
--portgroup-name | -p
The name of the port group to set shaping policy for.
--use-vswitch | -u
Reset all values for this policy to use parent virtual switch's settings
instead of overriding the settings for the port group. Using this in
conjunction with other settings will first reset all of the fields to use
the virtual switch setting and then apply the other options after the
reset.
network --help | -h
vswitch
Remove a port group from Show the help message.
standard
portgroup the given virtual switch --portgroup-name | -p
remove --vswitch-name | -v

--help | -h
network Show the help message.
vswitch
Set the vlan id for the --portgroup-name | -p
standard
portgroup given port group The name of the port group to set vlan id for.
set --vlan-id | -v
The vlan id for this port group. This value is in the range (0 - 4095)
network --help | -h
Remove a virtual switch
vswitch Show the help message.
standard
from the ESXi networking --vswitch-name | -v
remove system. The name of the virtual switch to remove.
--cdp-status | -c
The CDP status of the given virtual switch. It can be 'down', 'listen',
'advertise' or 'both'
network This command sets the --help | -h
vswitch MTU size and CDP status Show the help message.
standard set of a given virtual switch. --mtu | -m
The MTU size of the given virtual switch.
--vswitch-name | -v
The name of virtual switch to apply the configurations.
Add an uplink to the given
virtual switch. Note if this --help | -h
network virtual switch has a NIC Show the help message.
vswitch teaming policy assigned to --uplink-name | -u
standard it then the policy must The name of the uplink to add to the virtual switch.
uplink add
also be modified to enable --vswitch-name | -v
use of this uplink on this The name of the virtual switch to add an uplink to.
virtual switch
Remove an uplink from
the given virtual switch.
Note if this virtual switch --help | -h
network Show the help message.
vswitch has a NIC teaming policy
--uplink-name | -u
standard assigned to it then the
uplink
The name of the uplink to remove from the virtual switch.
policy must also be --vswitch-name | -v
remove
modified to disable use of The name of the virtual switch to remove an uplink from.
this uplink on this virtual
switch

esxcli software Commands

Command Description Options Help


software
Gets the host acceptance level. This controls --help | -h
acceptance
get what VIBs will be allowed on a host. Show the help message.

software --help | -h
Sets the host acceptance level. This controls
acceptance Show the help message.
set what VIBs will be allowed on a host. --level
Specifies the acceptance level to set. Should be
one of certified / accepted / partner /
community.
--help | -h
Show the help message.
--pending
Displays information for the ESXi image which
software Display the installed image profile and host becomes active after a reboot, or nothing if
profile get acceptance level. the pending-reboot image has not been
created yet. If not specified, information from
the current ESXi image in memory will be
returned.
--depot | -d
Specifies full remote URLs of the depot
index.xml or server file path pointing to an
offline bundle .zip file.
--dry-run
Performs a dry-run only. Report the VIB-level
operations that would be performed, but do
not change anything in the system.
--force | -f
Bypasses checks for package dependencies,
conflicts, obsolescence, and acceptance levels.
Really not recommended unless you know
what you are doing. Use of this option will
result in a warning being displayed in the
vSphere Client.
--help | -h
Show the help message.
--maintenance-mode
Pretends that maintenance mode is in effect.
Installs or applies an image profile from a depot
Otherwise, installation will stop for live installs
to this host. This command completely replaces
that require maintenance mode. This flag has
the installed image with the image defined by
software no effect for reboot required remediations.
the new image profile, and may result in the --no-live-install
profile
install loss of installed VIBs. To preserve installed VIBs, Forces an install to /altbootbank even if the
use profile update instead. WARNING: If your VIBs are eligible for live installation or removal.
installation requires a reboot, you need to Will cause installation to be skipped on PXE-
disable HA first. booted hosts.
--no-sig-check
Bypasses acceptance level verification,
including signing. Use of this option poses a
large security risk and will result in a SECURITY
ALERT warning being displayed in the vSphere
Client.
--ok-to-remove
Allows the removal of installed VIBs as part of
applying the image profile. If not specified,
esxcli will error out if applying the image
profile results in the removal of installed VIBs.
--profile | -p
Specifies the name of the image profile to
install.
--proxy
Specifies a proxy server to use for HTTP, FTP,
and HTTPS connections. The format is proxy-
url:port.
software
profile
Updates the host with VIBs from an image --allow-downgrades
update profile in a depot. Installed VIBs may be If this option is specified, then the VIBs from
upgraded (or downgraded if --allow- the image profile which update, downgrade, or
downgrades is specified), but they will not be are new to the host will be installed. If the
removed. Any VIBs in the image profile which option is not specified, then the VIBs which
are not related to any installed VIBs will be update or are new to the host will be installed.
added to the host. WARNING: If your --depot | -d
installation requires a reboot, you need to Specifies full remote URLs of the depot
disable HA first. index.xml or server file path pointing to an
offline bundle .zip file.
--dry-run
Performs a dry-run only. Report the VIB-level
operations that would be performed, but do
not change anything in the system.
--force | -f
Bypasses checks for package dependencies,
conflicts, obsolescence, and acceptance levels.
Really not recommended unless you know
what you are doing. Use of this option will
result in a warning being displayed in the
vSphere Client.
--help | -h
Show the help message.
--maintenance-mode
Pretends that maintenance mode is in effect.
Otherwise, installation will stop for live installs
that require maintenance mode. This flag has
no effect for reboot required remediations.
--no-live-install
Forces an install to /altbootbank even if the
VIBs are eligible for live installation or removal.
Will cause installation to be skipped on PXE-
booted hosts.
--no-sig-check
Bypasses acceptance level verification,
including signing. Use of this option poses a
large security risk and will result in a SECURITY
ALERT warning being displayed in the vSphere
Client.
--profile | -p
Specifies the name of the image profile to
update the host with.
--proxy
Specifies a proxy server to use for HTTP, FTP,
and HTTPS connections. The format is proxy-
url:port.
--depot | -d
Specifies full remote URLs of the depot
index.xml or server file path pointing to an
offline bundle .zip file.
--help | -h
software Show the help message.
Validates the current image profile on the host --profile | -p
profile
validate against an image profile in a depot. Specifies the name of the image profile to
validate the host with.
--proxy
Specifies a proxy server to use for HTTP, FTP,
and HTTPS connections. The format is proxy-
url:port.
software Display details about an image profile from the --depot | -d
sources depot. Specifies full remote URLs of the depot
profile get
index.xml or server file path pointing to an
offline bundle .zip file.
--help | -h
Show the help message.
--profile | -p
Specifies the name of the image profile to
display.
--proxy
Specifies a proxy server to use for HTTP, FTP,
and HTTPS connections. The format is proxy-
url:port.
--depot | -d
Specifies full remote URLs of the depot
index.xml or server file path pointing to an
software offline bundle .zip file.
sources --help | -h
profile
List all the image profiles in a depot. Show the help message.
list --proxy
Specifies a proxy server to use for HTTP, FTP,
and HTTPS connections. The format is proxy-
url:port.
--depot | -d
Specifies full remote URLs of the depot
index.xml or server file path pointing to an
offline bundle .zip file.
--help | -h
Show the help message.
--proxy
Specifies a proxy server to use for HTTP, FTP,
and HTTPS connections. The format is proxy-
software url:port.
Displays detailed information about one or --vibname | -n
sources vib
get more VIB packages in the depot Specifies one or more VIBs in the depot to
display more information about. If this option
is not specified, then all of the VIB packages
from the depot will be displayed. Must be one
of the following forms: name, name:version,
vendor:name, or vendor:name:version.
--viburl | -v
Specifies one or more URLs to VIB packages to
display information about. http:, https:, ftp:,
and file: are all supported.
--depot | -d
Specifies full remote URLs of the depot
index.xml or server file path pointing to an
offline bundle .zip file.
software --help | -h
sources vib List all the VIBs from depots.
list
Show the help message.
--proxy
Specifies a proxy server to use for HTTP, FTP,
and HTTPS connections. The format is proxy-
url:port.
--help | -h
Show the help message.
software Displays detailed information about one or --pending
vib get more installed VIBs Displays information for the ESXi image which
becomes active after a reboot, or nothing if
the pending-reboot image has not been
created yet. If not specified, information from
the current ESXi image in memory will be
returned.
--vibname | -n
Specifies one or more installed VIBs to display
more information about. If this option is not
specified, then all of the installed VIBs will be
displayed. Must be one of the following forms:
name, name:version, vendor:name, or
vendor:name:version.
--depot | -d
Specifies full remote URLs of the depot
index.xml or server file path pointing to an
offline bundle .zip file.
--dry-run
Performs a dry-run only. Report the VIB-level
operations that would be performed, but do
not change anything in the system.
--force | -f
Bypasses checks for package dependencies,
conflicts, obsolescence, and acceptance levels.
Really not recommended unless you know
what you are doing. Use of this option will
result in a warning being displayed in the
vSphere Client.
--help | -h
Show the help message.
--maintenance-mode
Pretends that maintenance mode is in effect.
Otherwise, installation will stop for live installs
that require maintenance mode. This flag has
Installs VIB packages from a URL or depot. VIBs
no effect for reboot required remediations.
software may be installed, upgraded, or downgraded. --no-live-install
vib install WARNING: If your installation requires a reboot, Forces an install to /altbootbank even if the
you need to disable HA first. VIBs are eligible for live installation or removal.
Will cause installation to be skipped on PXE-
booted hosts.
--no-sig-check
Bypasses acceptance level verification,
including signing. Use of this option poses a
large security risk and will result in a SECURITY
ALERT warning being displayed in the vSphere
Client.
--proxy
Specifies a proxy server to use for HTTP, FTP,
and HTTPS connections. The format is proxy-
url:port.
--vibname | -n
Specifies VIBs from a depot, using one of the
following forms: name, name:version,
vendor:name, or vendor:name:version.
--viburl | -v
Specifies one or more URLs to VIB packages to
install. http:, https:, ftp:, and file: are all
supported.
--help | -h
software Show the help message.
vib list
Lists the installed VIB packages --pending
Displays information for the ESXi image which
becomes active after a reboot, or nothing if
the pending-reboot image has not been
created yet. If not specified, information from
the current ESXi image in memory will be
returned.
--dry-run
Performs a dry-run only. Report the VIB-level
operations that would be performed, but do
not change anything in the system.
--force | -f
Bypasses checks for package dependencies,
conflicts, obsolescence, and acceptance levels.
Really not recommended unless you know
what you are doing. Use of this option will
result in a warning being displayed in the
vSphere Client.
--help | -h
Removes VIB packages from the host. Show the help message.
software
vib remove
WARNING: If your installation requires a reboot, --maintenance-mode
you need to disable HA first. Pretends that maintenance mode is in effect.
Otherwise, remove will stop for live removes
that require maintenance mode. This flag has
no effect for reboot required remediations.
--no-live-install
Forces an remove to /altbootbank even if the
VIBs are eligible for live removal. Will cause
installation to be skipped on PXE-booted hosts.
--vibname | -n
Specifies one or more VIBs on the host to
remove. Must be one of the following forms:
name, name:version, vendor:name,
vendor:name:version.
--depot | -d
Specifies full remote URLs of the depot
index.xml or server file path pointing to an
offline bundle .zip file.
--dry-run
Performs a dry-run only. Report the VIB-level
operations that would be performed, but do
not change anything in the system.
--force | -f
Bypasses checks for package dependencies,
conflicts, obsolescence, and acceptance levels.
Really not recommended unless you know
Update installed VIBs to newer VIB packages.
what you are doing. Use of this option will
software No new VIBs will be installed, only updates.
vib update
result in a warning being displayed in the
WARNING: If your installation requires a reboot,
vSphere Client.
you need to disable HA first. --help | -h
Show the help message.
--maintenance-mode
Pretends that maintenance mode is in effect.
Otherwise, installation will stop for live installs
that require maintenance mode. This flag has
no effect for reboot required remediations.
--no-live-install
Forces an install to /altbootbank even if the
VIBs are eligible for live installation or removal.
Will cause installation to be skipped on PXE-
booted hosts.
--no-sig-check
Bypasses acceptance level verification,
including signing. Use of this option poses a
large security risk and will result in a SECURITY
ALERT warning being displayed in the vSphere
Client.
--proxy
Specifies a proxy server to use for HTTP, FTP,
and HTTPS connections. The format is proxy-
url:port.
--vibname | -n
Specifies VIBs from a depot, using one of the
following forms: name, name:version,
vendor:name, or vendor:name:version. VIB
packages which are not updates will be
skipped.
--viburl | -v
Specifies one or more URLs to VIB packages to
update to. http:, https:, ftp:, and file: are all
supported. VIB packages which are not
updates will be skipped.

esxcli storage Commands


Command Description Options Help
storage core List all the SCSI Host Bus Adapters on the --help | -h
adapter list system. Show the help message.
--adapter | -A
Select the adapter to use when rescanning
SCSI adapters. This must be a SCSI HBA
name as shown in the adapter list
command. This cannot be used with the --
all option
--all | -a
Indicate the rescan should rescan all
adapters instead of a specific one.
--help | -h
Show the help message.
--skip-claim | -S
By default after an add operation a claiming
session is run to find new devices and have
Rescan SCSI HBAs to search for new Devices, them be claimed by the appropriate
remove DEAD paths and update path state. This Multipath Plugin. Passing this flag will skip
storage core
adapter rescan
operation will also run an claim operation that claiming session.
equivalent to the claimrule run command and a --skip-fs-scan | -F
filesystem rescan. By default after all rescan operations a
filesystem scan is performed to add newly
found filesystems and remove any
filesystems that are no longer available.
Passing this flag will skip that filesystem
scan.
--type | -t
Specify the type of rescan to perform.
Available types are add: Perform rescan and
only add new devices if any. all: Perform
rescan and do all opertaions (this is the
default action.) delete: Perform rescan and
only delete DEAD devices. update: Rescan
existing paths only and update path states.
--adapter | -a
storage core
List the SCSI stats for the SCSI Host Bus Adapters Limit the stats output to one adapter
adapter stats
in the system. --help | -h
get
Show the help message.
--claimrule-class | -c
Indicate the claim rule class to use in this
operation [MP, Filter, VAAI, all].
--enabled
Set the autoclaiming enabled state for a
givenPSA plugin type in the VMkernel.
Control the automatic PSA (path/device)
Default is to have this process enabled. This
claiming code allowing the disabling of the
should not be changed by users unless
storage core automatic claiming process or re-enabling of the
specifically instructed to do so.
claiming claiming process if it was previously disabled. By --help | -h
autoclaim default the automatic PSA claiming process is on Show the help message.
and should not be disabled by users unless --wait | -w
specifically instructed to do so. If the --wait flag is provided then the
autoclaim enable will wait for paths to
'settle' before running the claim operation.
This means that the system is reasonably
sure that all paths on the system have
appeared before enabling autoclaim.
--device | -d
Reclaim requires the name of a device on
storage core Attempt to unclaim all paths to a device and
which all paths will be unclaimed and then
claiming then run the loaded claimrules on each of the
reclaim reclaimed.
paths unclaimed to attempt to reclaim them. --help | -h
Show the help message.
--adapter | -A
If the --type paramter is 'location' this value
indicates the name of the host bus adapter
for the paths you wish to unclaim. This
parameter can be omitted to indicate
unclaiming should be run on paths from all
adapters.
--channel | -C
If the --type parameter is 'location' this
1) Unclaim a path or set of paths, disassociating value indicates the value of the SCSI
them from a PSA plugin. NOTES: It is normal for channel number for the paths you wish to
path claiming to fail especially when unclaiming unclaim. This parameter can be omitted to
by plugin or adapter. Only inactive paths with no indicate unclaiming should be run on paths
I/O will be able to be unclaimed. Typically the with any channel number.
storage core --claimrule-class | -c
ESXi USB partition and devices with VMFS
claiming Indicate the claim rule class to use in this
unclaim volumes on them will not be unclaimable. Also
NOTE unclaiming will not persist and periodic operation [MP, Filter].
--device | -d
path claiming will reclaim these paths in the If the --type parameter is 'device' attempt
near future unless claim rules are configured to to unclaim all paths to a specific device (for
mask the path. 2) Detach a (set of) filter(s) from multipathing plugins) or unclaim the device
one or more devices. itself (for filter plugins). NOTE. For paths, if
there are any active I/O operations on this
device, at least 1 path will fail to unclaim.
--driver | -D
If the --type parameter is 'driver' attempt to
unclaim all paths provided by a specific HBA
driver.
--help | -h
Show the help message.
--lun | -L
If the --type paramter is 'location' this value
indicates the value of the SCSI Logical Unit
Number (LUN) for the paths you wish to
unclaim. This parameter can be omitted to
indicate unclaiming should be run on paths
with any Logical Unit Number.
--model | -m
If the --type parameter is 'vendor' attempt
to unclaim all paths to devices with specific
model info (for multipathing plugins) or
unclaim the device itself (for filter plugins).
NOTE. For paths, if there are any active I/O
operations on this device, at least 1 path
will fail to unclaim.
--path | -p
If the --type parameter is 'path' attempt to
unclaim a specific path given its path UID or
runtime name.
--plugin | -P
If the --type parameter is 'plugin' attempt to
unclaim all paths on for a given multipath
plugin OR all devices attached to a filter
plugin.
--target | -T
If the --type paramter is 'location' this value
indicates the value of the SCSI target
number for the paths you wish to unclaim.
This parameter can be omitted to indicate
unclaiming should be run on paths with any
target number.
--type | -t
Indicate the type of unclaim you wish to
perform. Valid values for this paramter are
[location, path, driver, device, plugin,
vendor]
--vendor | -v
If the --type parameter is 'vendor' attempt
to unclaim all paths to devices with specific
vendor info (for multipathing plugins) or
unclaim the device itself (for filter plugins).
NOTE. For paths, if there are any active I/O
operations on this device, at least 1 path
will fail to unclaim.
--adapter | -A
Indicate the adapter of the paths to use in
this operation.
--autoassign | -u
The system will auto assign a rule id.
--channel | -C
Indicate the channel of the paths to use in
storage core Add a claimrule to the set of claimrules on the this operation.
claimrule add system. --claimrule-class | -c
Indicate the claim rule class to use in this
operation [MP, Filter, VAAI].
--device | -d
Indicate the Device Uid to use for this
operation.
--driver | -D
Indicate the driver of the paths to use in
this operation.
--force | -f
Force claim rules to ignore validity checks
and install the rule anyway.
--help | -h
Show the help message.
--if-unset
Execute this command if this advanced user
variable is not set to 1
--iqn | -i
Indicate the iSCSI Qualified Name for the
target to use in this operation.
--lun | -L
Indicate the LUN of the paths to use in this
operation.
--model | -M
Indicate the model of the paths to use in
this operation.
--plugin | -P
Indicate which PSA plugin to use for this
operation.
--rule | -r
Indicate the rule ID to use for this
operation.
--target | -T
Indicate the target of the paths to use in
this operation.
--transport | -R
Indicate the transport of the paths to use in
this operation. Valid Values are: [block, fc,
iscsi, iscsivendor, ide, sas, sata, usb, parallel,
unknown]
--type | -t
Indicate which type of matching used for
claim/unclaim or claimrule. Valid values are:
[vendor, location, driver, transport, device,
target]
--vendor | -V
Indicate the vendor of the paths to user in
this operation.
--wwnn
Indicate the World-Wide Node Number for
the target to use in this operation.
--wwpn
Indicate the World-Wide Port Number for
the target to use in this operation.
Convert ESX 3.x style /adv/Disk/MaskLUNs LUN
--commit | -C
masks to Claim Rule format. WARNING: This
Force LUN mask config changes to be saved.
storage core conversion will not work for all input MaskLUNs
If this parameter is omitted, config file
claimrule variations! Please inspect the list of generated
convert changes will not be saved.
claim rules carefuly, then if the suggested LUN --help | -h
mask claim rules are correct use the --commit Show the help message.
parameter to write the list to the config file.
--claimrule-class | -c
Indicate the claim rule class to use in this
storage core
claimrule list
List all the claimrules on the system. operation [MP, Filter, VAAI, all].
--help | -h
Show the help message.
storage core
claimrule load
Load path claiming rules from config file into the --claimrule-class | -c
VMkernel. Indicate the claim rule class to use in this
operation [MP, Filter, VAAI, all].
--help | -h
Show the help message.
--claimrule-class | -c
Indicate the claim rule class to use in this
operation [MP, Filter, VAAI].
--help | -h
Show the help message.
storage core --new-rule | -n
claimrule move
Move a claimrule from one rule id to another
Indicate the new rule id you wish to apply
to the rule given by the --rule parameter.
--rule | -r
Indicate the rule ID to use for this
operation.
--claimrule-class | -c
Indicate the claim rule class to use in this
operation [MP, Filter, VAAI].
--help | -h
storage core
Delete a claimrule to the set of claimrules on Show the help message.
claimrule
the system. --plugin | -P
remove
Indicate the plugin to use for this operation.
--rule | -r
Indicate the rule ID to use for this
operation.
--adapter | -A
If the --type parameter is 'location' this
value indicates the name of the host bus
adapter for the paths you wish to run claim
rules on. This parameter can be omitted to
indicate claim rules should be run on paths
from all adapters.
--channel | -C
If the --type parameter is 'location' this
value indicates the value of the SCSI
channel number for the paths you wish to
run claim rules on. This parameter can be
omitted to indicate claim rules should be
run on paths with any channel number.
--claimrule-class | -c
Indicate the claim rule class to use in this
storage core operation [MP, Filter].
claimrule run
Execute path claiming rules.
--device | -d
Indicate the Device Uid to use for this
operation.
--help | -h
Show the help message.
--lun | -L
If the --type paramter is 'location' this value
indicates the value of the SCSI Logical Unit
Number (LUN) for the paths you wish to run
claim rules on. This parameter can be
omitted to indicate claim rules should be
run on paths with any Logical Unit Number.
--path | -p
If the --type paramter is 'path' this value
indicates the unique path identifier (UID) or
the runtime name of a path which you wish
to run claim rules on.
--target | -T
If the --type parameter is 'location' this
value indicates the value of the SCSI target
number for the paths you wish to run claim
rules on. This parameter can be omitted to
indicate claim rules should be run on paths
with any target number.
--type | -t
Indicate the type of claim run you wish to
perform. By default the value of 'all' will be
used indicating you wish to run claim rules
without restricting the run to specific paths
or SCSI addresses. Valid values for this
parameter are [location, path, device, all]
--wait | -w
If the --wait flag is provided then the claim
command will wait until device registration
has completed to return. This option is only
valid when used with the --all option.
--device | -d
storage core Filter the output of the command to limit
Lists all devices that were detached manually by
device the output to a specific device.
detached list changing their state on the system. --help | -h
Show the help message.
--device | -d
storage core Provide control to allow a user to remove Select the detached device to remove from
device
detached
Detached devices from the persistent detached the Detached Device List.
remove device list. --help | -h
Show the help message.
--device | -d
Filter the output of this command to only
storage core For devices currently registered with the PSA,
device list
show a single device.
list the filters attached to them. --help | -h
Show the help message.
--device | -d
storage core Filter the output to a specific device.
device For a given device list all of the partitions --help | -h
partition list
Show the help message.
--device | -d
The device you wish to operate upon. This
can be any of the UIDs that a device
reports.
--help | -h
Show the help message.
--name | -n
storage core Provide control to allow a user to modify a SCSI The new name to assign the given device.
device set device's state. --no-persist | -N
Set device state non-peristently; state is lost
after reboot.
--state
Set the SCSI device state for a the specific
device given. Valid values are : off: Set the
device's state to OFF. on: Set the device's
state to ON.
--detached
storage core
Mark device as detached.
device Set device configuration --device | -d
setconfig
Apply the command to a single device.
--help | -h
Show the help message.
--perennially-reserved
Mark device as perennially reserved.
--device | -d
Limit the stats output to one specific device.
storage core This device name can be any of the UIDs the
device stats List the SCSI stats for SCSI Devices in the system.
get device reports
--help | -h
Show the help message.
--device | -d
storage core Filter the output of this command to only
List VAAI properties for devices currently
device vaai show a single device.
status get registered with the PSA. --help | -h
Show the help message.
--device | -d
Filter the output of the command to limit
storage core the output to a specific device. This device
Get a list of the worlds that are currently using
device world name can be any of the UIDs registered for
list devices on the ESX host.
a device.
--help | -h
Show the help message.
--device | -d
Limit the output to paths to a specific
device. This name can be any of the UIDs
for a specific device.
storage core --help | -h
path list
List all the SCSI paths on the system. Show the help message.
--path | -p
Limit the output to a specific path. This
name can be either the UID or the runtime
name of the path.
--help | -h

Provide control to allow a user to modify a Show the help message.


--path | -p
single path's state. This efffectively allows a user Select the path to set path state on. This
to enable or disable SCSI paths. The user is not can be a Runtime Name or Path UID
able to change the full range of path states, but --state
storage core can toggle between 'active' and 'off'. Please Set the SCSI path state for a the specific
path set NOTE changing the Path state on any path that path given. Valid values are : active: Set the
is the only path to a given device is likely to fail. path's state to active. This may be
The VMkernel will not change the path's state if immediately changed by the system to
changing the state would cause an 'All paths another state if the active state is not
down' state or the device is currently in use. appropriate. off: Administratively disable
this path.
--help | -h
Show the help message.
storage core List the SCSI stats for the SCSI Paths in the --path | -p
path stats get system. Limit the stats output to one specific path.
This path name can be the runtime name or
the path UID.
--help | -h
Show the help message.
storage core --plugin-class | -N
plugin list
List loaded PSA plugins on the system. Indicate the class of plugin to limit the list
to. Allowed values are : Filter: Filter plugins
MP: MultiPathing plugins VAAI: VAAI
plugins all: All PSA Plugins (default)
--dependencies | -d
Add the [optional] dependencies for this
module to loaded
--full-path | -I
Add the [optional] full path to this module
--help | -h
storage core Show the help message.
plugin --module-name | -m
registration
Register a plugin module with PSA.
add
Select the module name to be registered
--plugin-class | -N
Indicate the class of plugin to register.
Allowed values are MP, VAAI or MPP
defined subplugins like PSP, SATP.
--plugin-name | -P
Select the plugin name to be registered
--help | -h
Show the help message.
--module-name | -m
storage core Filter the output of this command to only
plugin
List modules currently registered with PSA. show a single module.
registration
--plugin-class | -N
list
Indicate the class of plugin to list. Allowed
values are MP, VAAI or MPP defined
subplugins like PSP, SATP.
storage core --help | -h
plugin Show the help message.
registration
UnRegister a plugin module with PSA. --module-name | -m
remove Select the module name to be unregistered
storage
Request mounting of known datastores not --help | -h
filesystem
automount explicitly unmounted. Show the help message.

storage
List the volumes available to the host. This --help | -h
filesystem
list includes VMFS, NAS and VFAT partitions. Show the help message.

--help | -h
Show the help message.
--no-persist | -n
Mount the volume non-peristently; the
volume will not be mounted after a restart.
storage --volume-label | -l
Connect to and mount an unmounted volume The label of the volume to mount. This
filesystem
mount on the ESX host. volume must be unmounted for this
operation to succeed.
--volume-uuid | -u
The UUID of the VMFS filesystem to mount.
This volume must be unmounted for this
operation to succeed.

storage Issue a rescan operation to the VMkernel to


--help | -h
filesystem have is scan storage devices for new mountable
rescan
Show the help message.
filesystems.
--help | -h
Disconnect and unmount and existing VMFS or Show the help message.
storage --no-persist | -n
NAS volume. This will not delete the Unmount the volume non-peristently; the
filesystem
unmount configuration for the volume, but will remove volume will be automounted after a restart.
the volume from the list of mounted volumes. --volume-label | -l
The label of the volume to unmount.
--volume-path | -p
The path of the volume to unmount.
--volume-uuid | -u
The uuid of the volume to unmount.
--help | -h
Show the help message.
--host | -H
The hostname or IP address of the NAS
volume to add and mount on the system.
--readonly | -r
If set this flag will set the mount point to be
storage nfs Add a new NAS volume to the ESX Host and read-only.
add mount it with the given volume name. --share | -s
The share name on the remote system to
use for this NAS mount point.
--volume-name | -v
The volume name to use for the NAS
mount. This must be a unique volume name
and cannot conflict with existing NAS, VMFS
or other volume names.
storage nfs List the NAS volumes currently known to the ESX --help | -h
list host. Show the help message.
--help | -h
Show the help message.
storage nfs Remove an existing NAS volume from the ESX --volume-name | -v
remove host. The volume name of the NAS volume to
remove from the ESX host.
--device | -d
List the devices currently controlled by the
Filter the output of this command to only
storage nmp VMware NMP Multipath Plugin and show the
device list
show a single device.
SATP and PSP information associated with that --help | -h
device. Show the help message.
--default | -E
The Path selection policy is set back to the
default for the assigned SATP for this
device.
--device | -d
Allow setting of the Path Selection Policy (PSP)
storage nmp The device you wish to set the Path
device set
for the given device to one of the loaded
Selection Policy for.
policies on the system. --help | -h
Show the help message.
--psp | -P
The Path selection policy you wish to assign
to the given device.
--device | -d
Filter the output of this command to only
List the paths currently claimed by the VMware show paths to a single device.
storage nmp --help | -h
path list
NMP Multipath Plugin and show the SATP and Show the help message.
PSP information associated with that path. --path | -p
Filter the output of this command to only
show a single path.
--device | -d
storage nmp The device you wish to get the Preferred
psp fixed Allow retrieving of Fixed Path Selection Policy
deviceconfig
path for.
settings for a given device. --help | -h
get
Show the help message.
--default | -E
Clear the preferred path selection for the
given device.
--device | -d
storage nmp The device you wish to set the preferred
Allow setting of the perferred path on a given
psp fixed path for. This device must be controlled by
deviceconfig
device controlled by the Fixed Path Selection
the Fixed Path Selection Policy
set Policy. --help | -h
Show the help message.
--path | -p
The path you wish to set as the preferred
path for the given device.
--device | -d
storage nmp The device you wish to get PSP
psp generic Allow retrieving of per device PSP configuration
deviceconfig
configuration for.
parameters. --help | -h
get
Show the help message.
--config | -c
Allow setting of per device PSP configuration The configuration string you wish to set.
storage nmp --device | -d
psp generic parameters. This command will set the The device you wish to set PSP
deviceconfig configuration for the given device with
set configuration for.
whichever PSP it is currently configurated with. --help | -h
Show the help message.
--help | -h
storage nmp Show the help message.
Allow retrieving of per path PSP configuration --path | -p
psp generic
pathconfig get parameters. The path you wish to get PSP configuration
for.
--config | -c
Allow setting of per path PSP configuration The configuration string you wish to set.
storage nmp --help | -h
parameters. This command will set the Show the help message.
psp generic
pathconfig set configuration for the given path with whichever --path | -p
PSP it is currently configurated with. The path you wish to set PSP configuration
for.
List the Path Selection Plugins (PSP) that are
storage nmp --help | -h
psp list
currently loaded into the NMP system and Show the help message.
display information about those PSPs
--device | -d
storage nmp The device you wish to get the Round Robin
psp roundrobin Allow retrieving of Round Robin Path Selection
deviceconfig
properties for.
Policy settings for a given device. --help | -h
get
Show the help message.
--bytes | -B
When the --type option is set to 'bytes' this
is the value that will be assigned to the byte
limit value for this device.
--device | -d
storage nmp The device you wish to set the Round Robin
Allow setting of the Round Robin path options
psp roundrobin settings for. This device must be controlled
deviceconfig
on a given device controlled by the Round Robin
by the Round Roubin Path Selection Policy
set Selection Policy. --help | -h
Show the help message.
--iops | -I
When the --type option is set to 'iops' this is
the value that will be assigned to the I/O
operation limit value for this device.
--type | -t
Set the type of the Round Robin path
switching that should be enabled for this
device. Valid values for type are: bytes: Set
the trigger for path switching based on the
number of bytes sent down a path. default:
Set the trigger for path switching back to
default values. iops: Set the trigger for path
switching based on the number of I/O
operations on a path.
--useano | -U
Set useano to true,to also include non-
optimizedpaths in the set of active paths
used to issue I/Os on this device,otherwise
set it to false
--device | -d
storage nmp The device you wish to get SATP
satp generic Allow retrieving of per device SATP
deviceconfig
configuration for.
configuration parameters. --help | -h
get
Show the help message.
--config | -c
Allow setting of per device SATP configuration The configuration string you wish to set.
storage nmp --device | -d
satp generic parameters. This command will set the The device you wish to set SATP
deviceconfig configuration for the given device with
set configuration for.
whichever SATP it is currently configurated with. --help | -h
Show the help message.
--help | -h
storage nmp Show the help message.
Allow retrieving of per path SATP configuration --path | -p
satp generic
pathconfig get parameters. The path you wish to get SATP configuration
for.
--config | -c
Allow setting of per path SATP configuration The configuration string you wish to set.
storage nmp --help | -h
parameters. This command will set the Show the help message.
satp generic
pathconfig set configuration for the given path with whichever --path | -p
SATP it is currently configurated with. The path you wish to set SATP configuration
for.
List the Storage Array Type Plugins (SATP) that
storage nmp --help | -h
satp list
are currently loaded into the NMP system and Show the help message.
display information about those SATPs
--boot | -b
This is a system default rule added at boot
time. Do not modify esx.conf or add to host
profile.
--claim-option | -c
Set the claim option string when adding a
SATP claim rule.
storage nmp Add a rule to the list of claim rules for the given --description | -e
satp rule add SATP. Set the claim rule description when adding
a SATP claim rule.
--device | -d
Set the device when adding SATP claim
rules. Device rules are mutually exclusive
with vendor/model and driver rules.
--driver | -D
Set the driver string when adding a SATP
claim rule. Driver rules are mutually
exclusive with vendor/model rules.
--force | -f
Force claim rules to ignore validity checks
and install the rule anyway.
--help | -h
Show the help message.
--model | -M
Set the model string when adding SATP a
claim rule. Vendor/Model rules are
mutually exclusive with driver rules.
--option | -o
Set the option string when adding a SATP
claim rule.
--psp | -P
Set the default PSP for the SATP claim rule.
--psp-option | -O
Set the PSP options for the SATP claim rule.
--satp | -s
The SATP for which a new rule will be
added.
--transport | -R
Set the claim transport type string when
adding a SATP claim rule.
--type | -t
Set the claim type when adding a SATP
claim rule.
--vendor | -V
Set the vendor string when adding SATP
claim rules. Vendor/Model rules are
mutually exclusive with driver rules.
--help | -h
storage nmp List the claiming rules for Storage Array Type Show the help message.
satp rule list Plugins (SATP) --satp | -s
Filter the SATP rules to a specific SATP
--boot | -b
This is a system default rule added at boot
time. Do not modify esx.conf or add to host
profile.
--claim-option | -c
The claim option string for the SATP claim
rule to delete.
--description | -e
The desription string for the SATP claim rule
to delete.
--device | -d
The device for the SATP claim rule to delete
storage nmp
Delete a rule from the list of claim rules for the --driver | -D
satp rule
remove given SATP. The driver string for the SATP claim rule to
delete.
--help | -h
Show the help message.
--model | -M
The model string for the SATP claim rule to
delete.
--option | -o
The option string for the SATP claim rule to
delete.
--psp | -P
The default PSP for the SATP claim rule to
delete.
--psp-option | -O
The PSP options for the SATP claim rule to
delete.
--satp | -s
The SATP for which a rule will be deleted.
--transport | -R
The transport type for the SATP claim rule
to delete.
--type | -t
Set the claim type when adding a SATP
claim rule.
--vendor | -V
The vendor string for the SATP claim rule to
delete
--boot | -b
This is a system default rule added at boot
time. Do not modify esx.conf or add to host
profile.
--default-psp | -P
storage nmp Set the default Path Selection Policy for a given The default path selection policy to set for a
satp set Storage Array Type Plugin (SATP). given --satp
--help | -h
Show the help message.
--satp | -s
The SATP name for the Storage Array Type
Plugin on which this command will operate.
storage vmfs --help | -h
extent list
List the VMFS extents available on the host. Show the help message.
--help | -h
Show the help message.
--volume-label | -l
storage vmfs The VMFS volume label of the target
List extents of unresolved snapshots/replicas of
snapshot
extent list VMFS volume. snapshot to enumerate.
--volume-uuid | -u
The VMFS volume uuid of the target
snapshot to enumerate.
--help | -h
Show the help message.
--volume-label | -l
storage vmfs List unresolved snapshots/replicas of VMFS The VMFS volume label of the snapshot to
snapshot list volume. list.
--volume-uuid | -u
The VMFS volume uuid of the snapshot to
list.
--help | -h
Show the help message.
--no-persist | -n
Mount the volume non-peristently; the
volume will not be automounted after a
storage vmfs restart.
snapshot mount
Mount a snapshot/replica of a VMFS volume. --volume-label | -l
The VMFS volume label of the snapshot to
mount.
--volume-uuid | -u
The VMFS volume uuid of the snapshot to
mount.
storage vmfs --help | -h
Resignature a snapshot/replica of a VMFS
snapshot Show the help message.
resignature volume. --volume-label | -l
The VMFS volume label of the snapshot to
resignature.
--volume-uuid | -u
The VMFS volume uuid of the snapshot to
resignature.
--help | -h
Show the help message.
storage vmfs --volume-label | -l
upgrade
Upgrade a VMFS3 volume to VMFS5. The label of the volume to upgrade.
--volume-uuid | -u
The uuid of the volume to upgrade.

esxcli system Commands

Command Description Options Help


storage core List all the SCSI Host Bus Adapters on the --help | -h
adapter list system. Show the help message.
system boot --help | -h
device get
Get the systems boot device. Show the help message.
system
Get the currently configured parameters --help | -h
coredump
network get for network coredump, if enabled. Show the help message.

--enable | -e
Enable network dump.
--help | -h
Show the help message.
system --interface-name | -v
Set the parameters used for network core An active interface to be used for the network core
coredump
network set dump dump.
--server-ipv4 | -i
IP address of the core dump server.
--server-port | -o
Port on which the core dump server is listening.
Get one of the dump partition configured
system values. This command will print either the
coredump --help | -h
partition active dump partition or the configured Show the help message.
get dump partition depending on the flags
passed.
List all of the partitions on the system that
system have a partition type matching the
coredump VMware Core partition type. Also indicate --help | -h
partition which partition, if any, is being used as Show the help message.
list
the system's dump partition and which is
configured to be used at next boot.
--enable | -e
Enable or disable the VMkernel dump partition.
--help | -h
Show the help message.
Set the specific VMkernel dump partition --partition | -p
system for this system. This will configure the The name of the partition to use. This should be a
coredump
dump partition for the next boot. This device name with a partition number at the end.
partition
set command will change the active dump Example: naa.xxxxx:1
partition to the partition specified. --smart | -s
If --enable=true, this flag will cause the best
available partition to be selected using the smart
selection algorithm.
--unconfigure | -u
Set the dump partition into an unconfigured state.
This will remove the current configured dump
partition for the next boot. This will result in the
smart activate algorithm being used at the next
boot.
system Get the host, domain or fully qualified --help | -h
hostname get name of the ESX host. Show the help message.
--domain | -d
The domain name to set for the ESX host. This
option is mutually exclusive with the --fqdn option.
--fqdn | -f
Set the fully qualified domain name of the ESX host.
--help | -h
This command allows the user to set the Show the help message.
system
hostname set
hostname, domain name or fully qualified --host | -H
domain name of the ESX host. The host name to set for the ESX host. This name
should not contain the DNS domain name of the
host and can only contain letters, numbers and '-'.
NOTE this is not the fully qualified name, that can
be set with the --fqdn option. This option is
mutually exclusive with the --fqdn option.
--help | -h
Show the help message.
system Show the ELF header information for the --module | -m
module get given VMkernel module. The name of the VMkernel module to get the
option string for.
--enabled | -e
List the enabled / disabled VMkernel modules and
device drivers.
system List the VMkernel modules that the --help | -h
module list system knows about. Show the help message.
--loaded | -l
List the loaded / not loaded VMkernel modules and
device drivers.
--force | -f

Load a VMkernel module with the given Ignore the enabled/disabled state of this module
name if it is enabled. If the module is and force it to load.
system
--help | -h
module load disabled then the use of --force is Show the help message.
required to load the module. --module | -m
The name of the VMkernel module to load.
--help | -h
system List the parameters, a descriptions of each
Show the help message.
module parameter supported for a given module --module | -m
parameters name and the user defined value for each
list
The name of the VMkernel module to get the
parameter. option string for.
--force | -f
Skip VMkernel module validity checks and set
parameters for a module (or alias) with the given
name.
system --help | -h
module Set the load time parameters for the
parameters
Show the help message.
given VMkernel module. --module | -m
set
The name of the VMkernel module to set
parameters for.
--parameter-string | -p
The string containing the parameters for this
module.
--enabled | -e
Set to true to enable the module, set to false to
disable the module.
--force | -f
Skip VMkernel module validity checks and set
system Allow enabling and disabling of a
module set
options for a module (or alias) with the given name.
VMkernel module. --help | -h
Show the help message.
--module | -m
The name of the VMkernel module to set options
for.
system List the VMkernel UserWorld processes --help | -h
process list currently on the host. Show the help message.
system
process System load average over the last 1, 5 and --help | -h
stats load 15 minutes. Show the help message.
get
system
process --help | -h
stats
Number of currently running processes. Show the help message.
running get

system
List the enforcement level for each --help | -h
secpolicy
domain list domain. Show the help message.

--all-domains | -a
All domains.
Set the enforcement level for a domain in --help | -h
system
the system. Any option specified here is Show the help message.
secpolicy
not persistent and will not survive a --level | -l
domain set
reboot of the system. The enforcement level.
--name | -n
The domain name.
--help | -h
Show the help message.
system --tree | -t
settings List the advanced options available from Limit the list of advanced option to a specific sub
advanced the VMkernel. tree.
list --option | -o
Only get the information for a single advanced
option.
--default | -d
Reset the option to its default value.
--help | -h
Show the help message.
system --int-value | -i
settings Set the value of an advanced option. If the option is an integer value use this option.
advanced set --option | -o
The name of the option to set the value of.
Example: " /Misc/HostName"
--string-value | -s
If the option is a string use this option.
system --help | -h
settings List VMkernel kernel settings.
kernel list
Show the help message.

--help | -h
system
Show the help message.
settings Set a VMKernel setting. --setting | -s
kernel set
The name of the VMKernel setting to set.
--value | -v
The value to set the setting to.
system stats Disply the number of microseconds the --help | -h
uptime get system has been running. Show the help message.
system
Show the current global configuration --help | -h
syslog
config get values Show the help message.

system
syslog --help | -h
config
Show the currently configured sub-loggers Show the help message.
logger list
--help | -h
Show the help message.
--id
The id of the logger to configure
system --reset
syslog Set configuration options for a specific Reset values to default
config sub-logger --rotate
logger set Number of rotated logs to keep for a specific logger
(requires --id)
--size
Set size of logs before rotation for a specific logger,
in KiB (requires --id)
--default-rotate
Default number of rotated logs to keep
--default-size
Default size of logs before rotation, in KiB
--help | -h
Show the help message.
system --logdir
syslog Set global log configuration options The directory to output logs to
config set --logdir-unique
Place logs in a unique subdirectory of logdir, based
on hostname
--loghost
The remote host to output logs to
--reset
Reset values to default
--help | -h
system Show the help message.
syslog mark
Mark all logs with the specified string --message | -s
The message to place in the logs
system
Reload the log daemon to apply any new --help | -h
syslog
reload configuration options Show the help message.

system time --help | -h


get
Disply the current system time. Show the help message.
--day | -d
Day
--help | -h
Show the help message.
--hour | -H
Set the system clock time. Any missing
system time Hour
set
parameters will default to the current --min | -m
time Minute
--month | -M
Month
--sec | -s
Second
--year | -y
Year
system uuid --help | -h
get
Get the system UUID. Show the help message.
system Display the product name, version and --help | -h
version get build information. Show the help message.

system Obtain status information on the memory --help | -h


visorfs get filesystem as a whole. Show the help message.
--help | -h
Show the help message.
--max-size | -M
Maximum size (max reservation in MB)
--min-size | -m
system
Add a new Visorfs RAM disk to the ESXi Minimum size (min reservation in MB)
visorfs
Host and mount it. --name | -n
ramdisk add
Name for the ramdisk
--permissions | -p
Permissions for the root of the ramdisk (mode)
--target | -t
Mountpoint for the ramdisk
system --help | -h
visorfs List the RAM disks used by the host.
ramdisk list
Show the help message.

system --help | -h
visorfs Remove a Visorfs RAM disk from the ESXi Show the help message.
ramdisk Host. --target | -t
remove Mountpoint for the ramdisk
system --help | -h
visorfs List the tardisks used by the host.
tardisk list
Show the help message.

system --help | -h
welcomemsg Get the Welcome Message for DCUI.
get
Show the help message.

--help | -h
system
Show the help message.
welcomemsg Set the Welcome Message for DCUI. --message | -m
set
Welcome Message String.

esxcli vm Commands

Command Description Options Help


--help | -h
Show the help message.
--type | -t
The type of kill operation to attempt. There are three types of VM
kills that can be attempted: [soft, hard, and force]. Users should
Used to forcibly kill Virtual always attempt 'soft' kills first, which will give the VMX process a
vm process Machines that are stuck chance to shutdown cleanly (like kill or kill -SIGTERM). If that does not
kill and not responding to work move to 'hard' kills which will shutdown the process
normal stop operations. immediately (like kill -9 or kill -SIGKILL). 'force' should be used as a
last resort attempt to kill the virtual machine. If all three fail then a
reboot is required.
--world-id | -w
The World ID of the virtual machine to kill. This can be obtained from
the 'vm list' command
vm process List the virtual machines on --help | -h
list this system. This command Show the help message.
currently will only list
running VMs on the
system.

svmotion

• NAME
• SYNOPSIS
• DESCRIPTION
o Interactive Mode
o Noninteractive Mode
• OPTIONS
• EXAMPLES

NAME

svmotion - move the storage of a virtual machine while it is running

SYNOPSIS
svmotion <connection_options> --interactive
svmotion <connection_options>
--datacenter=<datacenter name>
--vm <VM config datastore path>:
<new datastore name>
[--disks <virtual disk datastore path>:
<new datastore>,
<virtual disk datastore path>:
<new datastore>]

DESCRIPTION

The svmotion command moves a virtual machine's configuration file, and, optionally, its disks, while the virtual machine
is running. The Basic System Administration manual discusses how to use svmotion. You can use svmotion to initiate
migrations for virtual machines running on either ESX or ESXi hosts.
When you run svmotion, --server must point to a vCenter Server system.
The --vm option specifies the virtual machine and its destination. By default, svmotion relocates all virtual disks to the
same datastore as the virtual machine. Use the --disks option to relocate individual virtual disks to different datastores.
You cannot relocate a virtual disk without relocating the virtual machine configuration file.
The svmotion command supports both interactive or noninteractive mode.
Interactive Mode

To use the command in interactive mode, type svmotion --interactive. The command prompts you for the information
necessary to complete the storage migration. Use quotes around special characters on Windows systems.
When you specify --interactive, all other options are ignored.
Noninteractive Mode

In noninteractive mode, the svmotion command uses the following syntax:


svmotion [<connection_options]
--datacenter=<datacenter_name>
--vm <VM config_ds_path>:<new_ds>
[--disks <virtual_disk_ds_path>:<new_ds>, <vdisk_ds_path>:<new_ds>]

Square brackets indicate optional elements, not datastores.


OPTIONS

connection_options

Specifies the target server and authentication information if required. Run svmotion with --help for a list of all
connection options.
In non-interactive mode, all vCLI common options are supported. In interactive mode, command-line options
are ignored and svmotion uses user input instead.
--help

Prints a help message for each command-specific and each connection option. Calling the script with no
arguments or with --help has the same effect.
--usage

Prints a short usage string. The usage string is also displayed when the number or format of input parameters is
incorrect.
--interactive

Starts interactive mode, where svmotion prompts you for all arguments. In interactive mode, svmotion does a
sanity test on each option.
Note: You must enclose strings that contain special characters in quotes when responding to prompts.
--datacenter <datacenter_name>

Datacenter that contains the virtual machine to be migrated. Surround the name in quotes if it contains white
spaces or special characters.
--disks <virtual_disk_datastore_path>:<new_datastore>...

Locations of individual disks. The format is datastore path of the disk, colon, name of the destination datastore.
If the path contains spaces or special characters, you must quote it. You can specify multiple datastore and
destination pairs, separated by commas. If you do not specify this option, all virtual disks associated with a
virtual machine are relocated to the same datastore as the virtual machine configuration file. Specify this option
to locate individual virtual disks to different datastores.
To keep a virtual disk on its current datastore, use the --disks option for that disk, with its current datastore as
the <new_datastore>.
--vm <VM_config_ds_path>:<new_ds>

Specifies which virtual machine to move and to which datastore.


<VM_config_ds_path> is the path to the virtual machine configuration file. If the path contains spaces or other
special characters, you must quote it.
<new datastore> is the name of the new datastore for the virtual machine configuration file or disk.

EXAMPLES

These examples are formatted for readability. In general, the command should be all on one line.
Start the interactive version.
svmotion --interactive

Relocate a virtual machine's storage (including disks) to new_datastore:


svmotion --url=https://myvc.mycorp.com/sdk
--username=me
--password=secret
--datacenter=DC1
--vm='[old_datastore] myvm/myvm.vmx:
new_datastore'

Relocate a virtual machine's storage to new_datastore, but leave the two disks (myvm/myvm_1.vmdk and
myvm/myvm_2.vmdk) in old_datastore:
svmotion --datacenter='My DC'
--vm='[old_datastore] myvm/myvm.vmx:
new_datastore'
--disks='[old_datastore] myvm/myvm_1.vmdk:
old_datastore,
[old_datastore] myvm/myvm_2.vmdk:
old_datastore'

vicfg-advcfg - query and modify advanced VMkernel options. Use when instructed by Technical Support.
vicfg-advcfg - enable and disable CIM providers.
SYNOPSIS
vicfg-advcfg <connection_options>
[--default <value> |
--get <path> |
--get-kernel <boot_parameter> |
--quiet |
--help |
--set <value> <option> |
--set 0|1 UserVars.CIMEnabled |
--set 0|1 UserVars.CIMOEMProvidersEnabled |
--set 0|1 UserVars.CIMCustomProvidersEnabled |
--set-kernel <value> <boot_parameter> |
--set-message <message> |
--vihost <esx_target>]

DESCRIPTION

The vicfg-advcfg command offers a number of low-level advanced options.


Most options are not intended for customer use. You might use this command when VMware Technical Support or a
VMware Knowledge Base article instruct you to do so.
You can use the vicfg-advcfg -s option to enable and disable CIM providers.
OPTIONS

connection_options

Specifies the target server and authentication information if required. Run vicfg-advcfg --help for a list of all
connection options.
--default | -d <option>

Sets the value of a specific configuration item to the default value defined by the VMkernel. Use this option
when VMware Technical Support or a VMware Knowledge Base article instruct you to do so.
--get | -g <config_option>

Gets the value of a configuration option based on its path, and print the value to stdout. Use this option when
VMware Technical Support or a VMware Knowledge Base article instruct you to do so.
--get-kernel | -j <boot_param>

Gets the value of a VMkernel boot parameter. Use this option when VMware Technical Support or a VMware
Knowledge Base article instruct you to do so.
--help

Prints a help message for each command-specific and each connection option. Calling the script with no
arguments or with --help has the same effect.
--quiet | -q
No output to stdout while executing the command.
--set | -s <value> <option>

Sets the value of a configuration option based on its path. Use this option when VMware Technical Support or a
VMware Knowledge Base article instruct you to do so.
--set | -s 0|1 UserVars.CIMEnabled

Enables or disables all CIM providers.


--set | -s 0|1 UserVars.CIMOEMProvidersEnabled

Enables or disables OEM CIM providers.


--set | -s 0|1 UserVars.CIMCustomProvidersEnabled

Enables or disables IHV CIM providers.


--set-kernel | -k <value> <boot_param>

Sets the value of a VMkernel boot parameter. Use this option when VMware Technical Support or a VMware
Knowledge Base article instruct you to do so.
--set-message | -m <message>

Sets DCUI welcome message (valid for vSphere 4.0 and later). Use this option when VMware Technical Support
or a VMware Knowledge Base article instruct you to do so.
--list | -l

Lists all VMkernel advanced config options.


--vihost | -h <esx_target<gt

>

When you execute a vSphere CLI with the --server option pointing to a vCenter Server System, you can use --
vihost to specify the ESX/ESXi host to run the command against.
EXAMPLES

The following examples assume you are specifying connection options. Run vicfg-advcfg --help for a list of common
options including connection options.
Set the value of a specific configuration item given its identifying path and the value to set:
vicfg-advcfg <conn_options> -s 1 VMkernel.Boot.xapicForce

Get the value of a specific configuration item given its identifying path, and print the value to stdout:
vicfg-advcfg <conn_options> -g VMkernel.Boot.xapicForce

Set the value of a specific configuration item to the default value defined by the VMkernel:
vicfg-advcfg <conn_options> -d Irq.RoutingPolicy

Retrieve a VMkernel option:


vicfg-advcfg <conn_options> --get-kernel assumeCommonBusClock

Set a VMkernel option:


vicfg-advcfg <conn_options> --set-kernel 1 assumeCommonBusClock

Set a DCUI welcome message


vicfg-advcfg <conn_options> --set-message "Welcome message"

Enable all CIM providers:


vicfg-advcfg.pl <conn_options> -s 1 UserVars.CIMEnabled

Enable OEM CIM providers:


vicfg-advcfg.pl <conn_options> -s 1 UserVars.CIMOEMProvidersEnabled
Disable IHV CIM providers:
vicfg-advcfg.pl <conn_options> -s 0 UserVars.CIMCustomProvidersEnabled

vicfg-authconfig - manage Active Directory authentication schemes.

SYNOPSIS
vicfg-authconfig
<conn_options>
[--adpassword |
--adusername |
--authscheme |
--currentdomain |
--force |
--getremoteauthstore |
--help |
--leavecurrentdomain |
--listauthstores
--vihost]

DESCRIPTION

List information about Active Directory domains for a host, join an Active Directory domain, or leave the current
domain.

OPTIONS

--adpassword | -w <password>

Password with which to log into the domain controller. Use this option with the --joindomain option. If you do
not specify an AD password at the command line, the system prompts you.
--adusername | -U <name>

User name with which to log in to the domain controller. Use this option with the --joindomain option. If you do
not specify an AD user at the command line, the system prompts you.
--authscheme | -t AD

The authentication scheme to be configured. Currently the only supported argument is AD.
conn_options

Specifies the target server and authentication information if required. Run vicfg-authconfig --help for a list of all
connection options.
--currentdomain | -c

Displays the currently joined domain. Use this option in conjunction with the --authscheme option. This option
takes no arguments.
--force | -f

Use this option with the --leavecurrentdomain option to delete any AD user permissions on entities. If you run
vicfig-authcfg --leavecurrentdomain, AD user permissions are present, and you do not use --force, the operation
fails.
--getremoteauthstore | -a

Prints the active authentication mechanisms. This option takes no arguments.


--help
Prints a help message for each command-specific and each connection option. Calling the command with no
arguments or with --help has the same effect.
--joindomain | -j <domain_FQDN>

Joins the specified Active Directory domain. Use this option with the --authscheme option. This option takes in
the FQDN of the directory server as the argument.
--leavecurrentdomain | -L

Leaves the currently joined domain. Use this option with the --authscheme option. If AD user permissions on
entities exist, the operation fails unless you specify --force. This option takes no arguments.
--listauthstores | -l

Prints the supported authentication mechanisms. This option takes no arguments.


--vihost | -h <esx_host>

When you execute a vSphere CLI with the --server option pointing to a vCenter Server system, use --vihost to
specify the ESX/ESXi host to run the command against.

EXAMPLES

The following examples assume you are specifying connection options, either explicitly or, for example, by specifying
the server, user name, and password. Run vicfg-authconfig --help for a list of common options including connection
options.
List the supported authentication schemes:
vicfg-authconfig <conn_options> --listauthstores

Get the currently set authentication schemes:


vicfg-authconfig <conn_options> --getremoteauthstore

Join the specified AD Domain:


vicfg-authconfig <conn_options> <ad_conn_options> --authscheme AD --joindomain <domain_FQDN>

Leave the current AD Domain:


vicfg-authconfig <conn_options> --authscheme AD --leavecurrentdomain [--force]

Display the current AD Domain:


vicfg-authconfig <conn_options> --authscheme AD --currentdomain

vicfg-cfgbackup - back up and restore ESXi host configurations


NAME

vicfg-cfgbackup - back up and restore ESXi host configurations

SYNOPSIS
vicfg-cfgbackup
<conn_options>
[--force |
--help |
--load <backupfile> |
--reset |
--save <backupfile>]

DESCRIPTION
The vicfg-cfgbackup command backs up ESXi configuration data and restores them later. You can back up the host
configuration, restore the configuration to the host, force the restore of the configuration, and reset the host to factory
settings.
Back up ESXi host configuration before you change the configuration or upgrade the ESXi image. The vSphere Upgrade
Guide discusses backing up and restoring the ESXi configuration in some detail.
Important: This command is supported for ESXi hosts but not for ESX hosts.

OPTIONS

conn_options
Specifies the target server and authentication information if required. Run vicfg-cfgbackup --help for a
list of all connection options.
--force | -f
Forces the restore of the configuration.
--help
Prints a help message for each command-specific and each connection option. Calling the script with no
arguments or with --help has the same effect.
--load | -l <backupfile>
Restores configuration from <backupfile> onto the host.
--save | -s <backupfile>
Backs up the host configuration.
Include the number of the build that is running on the host that you are backing up in the backup filename. If
you are running the vSphere CLI from vMA, the backup file is saved locally on vMA. Local storage for backup files
is safe because vMA is stored in the /vmfs/volumes/<datastore> directory, which is separate from the ESXi
image and configuration files.
--reset | -r
Resets the host to factory settings.
--quiet | -q
Performs all operations without prompting for confirmation.

EXAMPLES

The following examples assume you are specifying connection options, either explicitly or, for example, by specifying
the server, user name, and password. Run vicfg-cfgbackup --help for a list of common options including
connection options.
Back up the host configuration to the file C:\backup.txt:
vicfg-cfgbackup <conn_options> -s C:\backup.txt

Reset the host, that is, restore to factory settings:


vicfg-cfgbackup <conn_options> -r

Restore a configuration previously saved to C:\backup.txt to the host:


vicfg-cfgbackup <conn_options> -l C:\backup.txt

Restore a configuration from C:\backup.txt without prompting for user confirmation:


vicfg-cfgbackup <conn_options> -l C:\backup.txt -q

vicfg-dns - configure DNS properties


NAME

vicfg-dns - configure DNS properties

SYNOPSIS
vicfg-dns <conn_options>
[--dhcp [yes|no] |
--dns <server_list> |
--domain <domain_name> |
--help |
--hostname <dns_host> |
--vnic <virtual_nic> |
--refresh |
--vihost <esx_host> ]

To list the existing DNS configuration, call the command without options.

DESCRIPTION

The vicfg-dns command lists and specifies the DNS configuration of your ESX/ESXi host. Call the command without
command-specific options to list the existing DNS configuration.
If you attempt to change the host name, domain name, or DNS server on hosts that use DHCP (dynamic host
configuration protocol), an error results.

OPTIONS

conn_options
Specifies the target server and authentication information if required. Run vicfg-dns --help for a list of all
connection options.
--dhcp | -H [yes|no]
Specifies whether or not the ESX/ESXi host should use DHCP to determine the DNS configuration automatically.
If you use this option, you must specify yes or no.
--dns | -D <server_list>
DNS server or servers to be used. Specify a comma-separated list of DNS servers, in order of preference. For
vSphere 4.0 and later, IPv6 addresses are valid.
--domain | -d <domain_name>
The domain name portion of the DNS name. For example, comp-xyz.com.
--help
Prints a help message for each command-specific and each connection option. Calling the script with no
arguments or with --help has the same effect.
--hostname | -n <dns_host>
Human-readable host name portion of the DNS name. For example, esx01.
--vnic | -V <virtual_nic>
The virtual network adapter to use in overriding the system DNS. This option is required when --dhcp is yes. For
ESX systems, <virtual_nic> must be one of the Service Console network adapters. For ESXi, <virtual_nic> must be
one of the VMkernel network adapters. The specified virtual network adapter must have DHCP configured.
--refresh | -r
Refresh the network system.
--vihost | -h <esx_host>
When you execute a vSphere CLI with the --server option pointing to a vCenter Server system, use --vihost
to specify the ESX/ESXi host to run the command against.

EXAMPLES

The following examples assume you are specifying connection options. Run vicfg-dns --help for a list of common
options including connection options.
Display DNS properties for the specified server. The information includes the host name, domain name, DHCP setting
(true or false) and DNS servers on the ESX/ESXi host:
vicfg-dns <conn_options>

Configure the DNS host name property:


vicfg-dns <conn_options> -n <host name>

Configure the DNS domain name property:


vicfg-dns <conn_options> -d <domain name>

Specify that the host should use DHCP to determine the DNS configuration:
vicfg-dns <conn_options> --dhcp yes --vnic <virtual_nic>

Disable DHCP:
vicfg-dns <conn_options> --dhcp no

vicfg-dumppart - query, set, and scan for diagnostic partitions on an ESX/ESXi system
NAME

vicfg-dumppart - query, set, and scan for diagnostic partitions on an ESX/ESXi system

SYNOPSIS
vicfg-dumppart [<conn_options>]
[--activate <partition> |
--deactivate <partition> |
--find |
--get-active |
--get-config |
--help |
--list |
--set <partition> |
--smart-activate |
--vihost]

DESCRIPTION

The vicfg-dumppart command queries, sets, and scans an ESX/ESXi host's diagnostic partitions. The ESX Configuration
Guide and the ESXi Configuration Guide discuss diagnostic partitions in detail and explain how to create a diagnostic
partition using the vSphere Client UI.

OPTIONS

connection_options
Specifies the target server and authentication information if required. Run vicfg-dumppart --help for a list of
all connection options.
--activate | -a <partition>
Makes the specified partition the current diagnostic partition. This option has the same effect as --set.
--deactivate | -d <partition>
Deactivates the active diagnostic partition. Specifying the name of the partition is optional. WARNING: If you
run vicfg-dumppart with this option, your system cannot write errors to a file until another partition is activated.
You lose any error record if errors occur.
--find | -f
Finds all diagnostic partitions on the ESX/ESXi host and prints them. The partitions can include, in order of
suitability, parallel adapter, block adapter, Fibre Channel, and hardware iSCSI.
--get-active | -t
Displays the active diagnostic partition for this system. Running vicfg-dumppart with this option returns the
internal name of the partition (naa.xxxxx:1) or 'none' if no partition is set.
--get-config | -c
Lists all configured partitions on the system.
--help
Prints a help message for each command-specific and each connection option. Calling the script with no
arguments or with --help has the same effect.
--list | -l
Lists all partitions on the ESX/ESXi system that have the appropriate partition type to act as a diagnostic
partition. CAUTION: Execution might take several minutes and slow down your ESX/ESXi host because the
command scans all LUNs on the system.
--set | -s <partition>
Sets and activates the diagnostic partition, which you must specify using naa.xxx:1 or eui.xxx syntax. Specify
none to deactivate the active diagnostic partition.
--smart-activate | -S
This option is currently not supported.
--vihost | -h
When you run a vCLI command with --server pointing to a vCenter Server system, use --vihost to specify
the ESX/ESXi host to run the command against.

EXAMPLES

The following examples assume you are specifying connection options, either explicitly or, for example, by specifying
the server, user name, and password. Run vicfg-dumppart --help for a list of common options including
connection options.
List the partitions available for diagnostic partitions: WARNING: This call scans all LUNs on the system and might
degrade system performance:
vicfg-dumppart <conn_options> -l

Get the active diagnostic partition for this system. Return the internal name of the partition:
vicfg-dumppart <conn_options> -t

Set the diagnostic partition for this system and activate it:
vicfg-dumppart <conn_options> -s naa.xxxxx:1

Deactivate the active diagnostic partition: WARNING: Deactivating the diagnostic partition leaves your system without
any means of reporting errors until another partition is activated.
vicfg-dumppart <conn_options> -d

vicfg-hostops - perform host-related operations.


NAME
vicfg-hostops - perform host-related operations.

SYNOPSIS
vicfg-hostops [<conn_options>]
[--action [suspend|poweroff] |
--cluster |
--datacenter |
--force |
--operation [enter | exit | shutdown | reboot | info] ]

DESCRIPTION

vicfg-hostops provides an interface for performing operations on ESX/ESXi hosts.


• enter maintenance mode
• exit maintenance mode
• shutdown host
• reboot host
The command also displays host related information.

OPTIONS

--action | -a [suspend | poweroff]


Action to perform on powered on virtual machines (suspend | poweroff) when hosts enter maintenance mode
or are rebooted. Default is suspend.
--cluster <cluster_name> | -c <cluster_name>
Specify this option to shut down all hosts in a cluster.
connection_options
Specifies the target server and authentication information if required. Run vicfg-hostops --help for a list
of all connection options.
--datacenter <dc_name> | -d <dc_name>
Specify this option to shut down all hosts in a datacenter.
--force | -f
Use --force to force the shutdown of all hosts, even those that are not in maintenance mode. If you do not
specify --force, only hosts that are in maintenance mode are shut down.
--help
Prints a help message for each command-specific and each connection option. Calling the script with no
arguments or with --help has the same effect.
--operation | -o
Required. Operation to perform. Specify
• enter to enter maintenance mode.
• exit to exit maintenance mode.
• shutdown to shut down one or more hosts. By default, hosts must be in maintenance mode. Use --force to
override that default.
• reboot to reboot one or more hosts. By default, hosts must be in maintenance mode. Use --force to override
that default.
• info to display information about one or more hosts
--vihost | -h
When you run a vSphere CLI command with the --server option pointing to a vCenter Server system, use --
vihost to specify the ESX/ESXi host to run the command against.

EXAMPLES

The following examples assume you are specifying connection options, either explicitly or, for example, by specifying
the server, user name, and password. Run vicfg-hostops --help for a list of common options including connection
options.
Put the host into maintenance mode:
vicfg-hostops <connection_options> -o enter

Instruct the host to exit maintenance mode:


vicfg-hostops <connection_options> -o exit

Put the host in maintenance mode and power off all powered on virtual machines:
vicfg-hostops <connection_options> -o enter -a poweroff

Put all hosts in the specified datacenter in maintenance mode, and suspend virtual machines that are powered on on
those hosts:
vicfg-hostops --server <VC server name> --username <user name>
--password <password> -o enter -d <datacenter name>
-h <esx_host_name> -a suspend

Shut down all hosts in a cluster. If the hosts are not in maintenance mode, power off all virtual machines and put the
hosts into maintenance mode:
vicfg-hostops --server <VC server name> --username <user name>
--password <password> -o shutdown
-c <cluster_name> -h <esx_host_name> --force

Reboot the host(s) in the datacenter that belong to the specified cluster. If hosts are not in maintenance mode, wait
until they are:
vicfg-hostops --server <VC_server-name> --username <user name>
--password <password> --operation reboot -d <datacenter_name>
-c <cluster_name> --vihost <esx_host_name> -f

Display information about a specified host:


vicfg-hostops --server <esx_host> --username <user name>
--password <password> --operation info

vicfg-ipsec - configure IPsec properties

SYNOPSIS
vicfg-ipsec [<conn_options>]
[--action [none|discard|ipsec] |
--add-sa <sa> |
--add-sp <sp> |
--dir [in | out] |
--dst-port <port> |
--flush-sa |
--flush-sp |
--ealgo [null | 3des-cbc | aes128-cbc]|
--ekey <e_key>|
--help |
--ialgo [hmac-sha1 | hmac-sha2-256] |
--ikey <i_key> |
--list-sa <sa> |
--list-sp <sp> |
--remove-sa <sa> |
--remove-sp <sp> |
--sa-dst <destination>
--sa-src <IP> |
--sa-name <name> |
--sp-dst <destination> |
--spi <spi> |
--sp-src <source> |
--spmode <mode> |
--src-port <port> |
--ulproto [any | tcp | udp | icmp6]

DESCRIPTION

vicfg-ipsec allows you to configure IPsec on your ESX/ESXi host. The command supports IPv6 but not IPv4 configuration.

OPTIONS

conn_options
Specifies the target server and authentication information if required. Run vicfg-ipsec --help for a list of
all connection options.
--action [none|discard|ipsec]
Action to take. Specify none to to allow all traffic, discard to discard all traffic, or ipsec to use IPsec with the
specified authentication and encryption settings.
--add-sa <sa>
Adds a security association. Use this option together with the --sa-src, --sa-dst, --sa-mode, and other
parameters to create a security association. The last parameter is always the name of the association.
--add-sp <sp>
Adds a security policy. Use this option together with the <--sp-src>, --sp-dst, --src-port, --dst-port and
other parameters to create a security policy. You must associate this policy with a named security association.
The last argument is always the name of the security policy.
--dir [in | out]
Direction, in our out.
--dst-port <port>
Destination port (0-65535)
--ealgo [null | 3des-cbc | aes128-cbc]
Encryption algorithm.
--ekey <e_key>
Encryption key; a series of hexadecimal digits preceded with 0x (zero ex).
--ialgo [hmac-sha1 | hmac-sha2-256]
Authentication algorithm.
--ikey <i_key>
Authentication key; a series of hexadecimal digits preceded with 0x (zero ex).
--flush-sa
Clear all entries in the Security Associations (sa) database. WARNING This option clears all entries even if SAs
are in use.
--flush-sp
Clear all entries in the Security Policy (sp) database. WARNING This option clears all entries even if SPs are in
use.
--help
Prints a help message for each command-specific and each connection option. Calling the script with no
arguments or with --help has the same effect.
--list-sa | -l
Display security sssociations.
--list-sp | -L
Display security policies.
--remove-sa <sa>
Removes a specified security association.
--remove-sp <sp>
Removes a specified security policy.
--sa-dst <destination_IP>
Destination IP of the Security Association.
--sa-src <source_IP>
Source IP of the Security Association.
--sa-name <name>
Security Association name. Specify auto to let the VMkernel choose an SA. If no suitable SA exists, the
VMkernel requests one using IKE.
--sp-dst <destination>
Destination IP address and prefix length.
--spi <spi>
Security parameters index. This index identifies security parameters in combination with IP address. The index
must be a hexadecimal number with a 0x prefix.
--sp-src <source>
Source IP address and prefix length.
--spmode [tunnel | transport]
Mode, either tunnel or transport.
--src-port <source_port>
Source port (0-65535)
--ulproto [any | tcp | udp | icmp6]
Upper layer protocol.

EXAMPLES

The following examples assume you are specifying connection options, either explicitly or, for example, by specifying
the server, user name, and password. Run vicfg-ipsec --help for a list of common options including connection
options.
Display all current IPsec properties:
vicfg-ipsec <conn_options> -l | --list-sa
vicfg-ipsec <conn_options> -L | --list-sp
Create a security association:
vicfg-ipsec <conn_options> --add-sa --sa-src 3ffe:501:ffff:0::a --sa-dst
3ffe:501:ffff:0001:0000:0000:0000:0001
--sa-mode transport --spi 0x1000
--ealgo 3des-cbc --ekey 0x6970763672656164796c6f676f336465736362636f757432
--ialgo hmac-sha1 --ikey 0x6970763672656164796c6f67736861316f757432 sa1

Configure a security policy:


vicfg-ipsec <conn_options> --add-sp --sp-src=2001:db8:1::/64 --sp-dst=2002:db8:1::/64
--src-port=23 --dst-port=25 --ulproto=tcp --dir=out
--action=ipsec --sp-mode=transport --sa-name sa1 sp1

Remove a security policy:


vicfg-ipsec <conn_options> --remove-sp sp1

Remove a security association:


vicfg-ipsec <conn_options> --remove-sa sa1

vicfg-iscsi - manage iSCSI storage.

SYNOPSIS
vicfg-iscsi [<connection_options>] [option] [suboption] [parameter] [<adapter_name>]

Option is one of --discovery, --static,--authentication, --phba, --target, --lun, --network (Hardware


iSCSI only), --pnp (Hardware iSCSI only), --iscsiname, --parameter, --swiscsi, --adapter.
Suboption is one of --list, --add, --remove.
Parameters differ depend on the suboption used.
<adapter_name> is required unless you specify the --help, --swiscsi, or --adapter option.

DESCRIPTION

vicfg-iscsi supports configuration and property retrieval for software or hardware iSCSI initiators. See the vSphere
Command-Line Interface Installation and Scripting Guide for more information.

OPTIONS

connection_options
Specifies the target server and authentication information if required. Run vicfg-iscsi --help for a list of
all connection options.
--help
Prints a help message for each command-specific and each connection option. Calling the script with no
arguments or with --help has the same effect.
--chap_password
Authentication password to use for setup of CHAP. Use with the --authentication option.
--chap_username
Authentication user name to use for setup of CHAP. Use with the --authentication option.
--discovery --list
Returns a list of discovery addresses and static targets and related properties if configured.
--discovery --add --ip <ip_addr | domain_name> [:<port_num>]
Adds a discovery address, by using <ip_addr> or <domain_name> and optional <port_num>, if <port_num> is
not specified, uses 3260 as default.
--discovery --remove --ip <ip_addr | domain_name> [:<port_num>]
Removes a discovery address, by using <ip_addr> or <domain_name> and optional <port_num>, if <port_num>
is not specified, uses 3260 as default.
--static --list
Returns a list of static discovery target(s) and related properties.
--static --add --ip <ip_addr | domain_name> [:<port_num>] --name <iscsi_name>
Adds a static discovery target by using <ip_addr> or <domain_name> and optionally <port_num>. If
<port_num> is not specified, uses 3260 as the default. The the target iscsi name must be in IQN or EUI format.
--static --remove --ip <ip_addr | domain_name> [:<port_num>] --name <iscsi_name>
Removes a static discovery target by using <ip_addr> or <domain_name> and optionally <port_num>. If
<port_num> is not specified, uses 3260 as the default. The target iscsi name must be in IQN or EUI format.
--authentication --list
Lists authentication method settings.
If only CHAP is set:
--authentication --level <level> --method <auth_method>
--mchap_username <m_username> --mchap_password <m_password>
[--ip <ip_addr | domain_name>[:<port_num>]
[--name<iscsi_name>]]>
If both CHAP and MCHAP are set:
--authentication --level <level> --method <auth_method>
--chap_username <username> --chap_password <password>
--mchap_username <m_username> --mchap_password <m_password>
[--ip <ip_addr | domain_name>[:<port_num>]
[--name<iscsi_name>]]>
--authentication --level <level> --method <auth_method> --chap_username<username> --chap_password
<password>> [--ip <ip_addr | domain_name>[:<port_num>] [--name <iscsi_name>]]
Sets iSCSI authentication properties. Sets level, authentication username and password. Supported
<auth_method> is CHAP.
Level is one of [chapRequired | chapPreferred | chapDiscouraged | chapProhibited].
If --ip and --name are specified, authentication is set for per-target CHAP. If only --ip is specified,
authentication is set for per discovery address CHAP. If neither --ip nor --name is specified, authentication is
set for per adapter CHAP.
--authentication --reset_auth --method <auth_method> --ip <ip_addr | domain_name>[:<port_num>] [--name
<iscsi_name>]
Resets target-level CHAP authentication properties to be inherited from the adapter level. Resetting adapter-
level properties is not supported.
--authentication --level <level> --method <auth_method> --mutual --mchap_username<username> --
mchap_password <password> [--ip <ip_addr | domain_name>[:<port_num>] [--name <iscsi_name>]]
Sets iSCSI authentication properties (level, authentication username and password) Specify CHAP as the value of
<auth_method>. Specify --mutual to indicate mutual CHAP.
Level is [chapRequired | chapPreferred | chapDiscouraged | chapProhibited] for simple CHAP and
[chapRequired | chapProhibited] for mutual CHAP.
If --ip and --name are specified, authentication is set for per-target mutual CHAP. If only --ip is specified,
authentication is set for per discovery address mutual CHAP. If neither --ip nor --name is specified,
authentication is set for per-adapter mutual CHAP.
--authentication --reset_auth --method <auth_method> --mutual --ip <ip_addr | domain_name>[:<port_num>] [--
name <iscsi_name>]
Resets target-level mutual CHAP authentication properties to be inherited from adapter level. Resetting
adapter-level properties is not supported.
--phba --list
Lists PHBA properties.
--target --list
Lists all target properties.
--lun --list
Lists LUN properties, including device name, bus number, LUN id, and size.
--lun --list --target_id <target_id>
Lists LUN properties for the specified <target_id>. Run vicfg-iscsi --lun --list to view the target ID.
--mchap_password
Authentication password to use for setup of mutual CHAP. Use with the --authentication option.
--mchap_username
Authentication user name to use for setup of mutual CHAP. Use with the --authentication option.
--network --list
Lists network properties, including IP, subnet mask, default gateway, etc.
--network --ip <ip_addr>
Sets the HBA IPv4 address to <ip_addr>.
--network --subnetmask <subnet_mask>
Sets the HBA network mask to <subnet_mask>.
--network --gateway <default_gateway>
Sets the HBA gateway to <default_gateway>.
--network --set ARP=true|false
Enables or disables ARP redirect.
--pnp --list
Lists physical network portal properties, including mac address info, max and current transfer rate, and MTU
size.
--pnp --mtu <mtu_size>
Sets MTU size to <mtu_size>.
--iscsiname --list
Lists iSCSI initiator node properties, including iSCSI name and alias name.
--iscsiname --name <iscsi_name>
Sets the iSCSI initiator node name to <iscsi_name> in IQN or EUI format.
--iscsiname --alias <alias_name>
Sets the iSCSI initiator node alias to <alias_name>.
--parameter --list [--detail] [--ip <ip_addr | domain_name> [:<port_num>][--name <iscsi_name>]]
Lists iSCSI parameters and their current value. If --ip and --name are specified, the list is for per target
parameters. If only --ip is specified, the list is for per discovery address parameters. If neither --ip nor --
name are specified, the list is for adapter parameters. Specifying --detail lists detailed properties of iSCSI
parameters.
--parameter --set <name>=<value> [--ip <ip_addr | domain_name>[:<port_num>] [--name <iscsi_name>]]
Sets the specified iSCSI parameter to the specified value if the parameter is settable. If --ip and --name are
specified, sets per target parameters. If only --ip is specified, sets per discovery address parameters. If neither
--ip nor --name is specified, sets adapter parameters. Run --parameter --list --detail for
information on whether a parameter is settable or not. The following parameters are supported. See the
vSphere Command-Line Interface Installation and Scription Guide for more information.
dataDigestType
HeaderDigest
MaxOutstandingR2T
FirstBurstLength
MaxBurstLength
MaxRecvDataSegLen
NoopInterval
NoopTimeout
RecoveryTimeout
DelayedAck

--parameter --reset <name> --ip <ip_addr | domain_name>[:<port_num>] [--name <iscsi_name>]]


Resets target-level iSCSI parameters to be inherited from the adapter level. Either --ip or --ip and --name
are required to specify a target. Resetting adapter-level parameters is not supported.
--swiscsi --list
Lists software iSCSI information (enabled or not enabled).
--swiscsi --enable
Enables software iSCSI.
--swiscsi --disable
Disables software iSCSI.
--adapter --list
Lists iSCSI adapter(s).
--vihost | -h
When you execute a vSphere CLI with the --server option pointing to a vCenter Server system, you can use --
vihost to specify the ESX/ESXi host to run the command against.

EXAMPLES

The following examples assume you are specifying connection options, either explicitly or, for example, by specifying
the server, user name, and password. Run vicfg-iscsi --help for a list of common options including connection
options.
List discovery addresses and static targets (if configured) and related properties:
vicfg-iscsi <conn_options>
--discovery --list <adapter_name>

Add a discovery address:


vicfg-iscsi <conn_options>
--discovery --add --ip <ip_addr | domain_name> <adapter_name>

Remove a discovery address


vicfg-iscsi <conn_options>
--discovery --remove --ip <ip_addr | domain_name> <adapter_name>

List static discovery targets and related properties:


vicfg-iscsi <conn_options>
--static --list <adapter_name>

Add a static discovery target:


vicfg-iscsi <conn_options>
--static --add --ip <ip_addr | domain_name> --name <iscsi_name> <adapter_name>

Remove a static discovery target:


vicfg-iscsi <conn_options>
--static --remove --ip <ip_addr | domain_name> --name <iscsi_name>
<adapter_name>

List authentication method settings:


vicfg-iscsi <conn_options>
--authentication --list <adapter_name>

List adapter level mutual CHAP setting:


vicfg-iscsi <conn_options>
--authentication --list -m CHAP -b <adapter_name>

List send target level CHAP setting:


vicfg-iscsi <conn_options>
--authentication --list -m CHAP --ip <ip address> <adapter_name>

List static target level CHAP setting:


vicfg-iscsi <conn_options>
--authentication --list -m CHAP --ip <ip address> --name <iqn name> <adapter_name>

Set authentication properties:


vicfg-iscsi <conn_options>
--authentication --method <auth_method> --level <level> --chap_username
<username> --chap_password <password> [--ip <ip_addr | domain_name>
[--name <iscsi_name>] <adapter_name>

Reset target level CHAP authentication properties to be inherited from adapter level:
vicfg-iscsi <conn_options>
--authentication --method <auth_method> --reset_auth --ip <ip_addr |
domain_name> [--name <iscsi_name>] <adapter_name>

List PHBA properties:


vicfg-iscsi <conn_options>
--phba --list <adapter_name>

List active targets properties:


vicfg-iscsi <conn_options>
--target --list <adapter_name>

List LUNs properties:


vicfg-iscsi <conn_options>
--lun --list <adapter_name>

List LUNs properties for target_id 0:


vicfg-iscsi <conn_options>
--lun --list --target_id 0 <adapter_name>

List network properties:


vicfg-iscsi <conn_options>
--network --list <adapter_name>
Set HBA IPv4 address:
vicfg-iscsi <conn_options>
--network --ip <ip_addr> <adapter_name>

Set HBA network mask:


vicfg-iscsi <conn_options>
--network --subnetmask <subnet_mask> <adapter_name>

Set HBA gateway:


vicfg-iscsi <conn_options>
--network --gateway <default_gateway> <adapter_name>

Set HBA IPv4 address and network mask and gateway:


vicfg-iscsi <conn_options>
--network --ip <ip_addr> --subnetmask <subnet_mask>
--gateway <default_gateway> <adapter_name>

Enable or disable ARP redirect:


vicfg-iscsi <conn_options>
--network --set ARP=true|false <adapter_name>

List PNP properties:


vicfg-iscsi <conn_options>
--pnp --list <adapter_name>

Set MTU size:


vicfg-iscsi <conn_options>
--pnp --mtu <mtu_size> <adapter_name>

List iSCSI initiator node properties:


vicfg-iscsi <conn_options>
--iscsiname --list <adapter_name>

Set iSCSI node iqn name:


vicfg-iscsi <conn_options>
--iscsiname --name <iscsi_name> <adapter_name>

Set iSCSI node alias:


vicfg-iscsi <conn_options>
--iscsiname --alias <alias_name> <adapter_name>

List iSCSI parameters:


vicfg-iscsi <conn_options>
--parameter --list <adapter_name>

List iSCSI parameters with details:


vicfg-iscsi <conn_options>
--parameter --list --detail <adapter_name>

List iSCSI parameters with details at target level:


vicfg-iscsi <conn_options>
--parameter --list --detail --ip <ip_addr | domain_name> <adapter_name>

Set adapter level iSCSI parameter:


vicfg-iscsi <conn_options>
--parameter --set <name>=<value> <adapter_name>

Set target level iSCSI parameter:


vicfg-iscsi <conn_options>
--parameter --set <name>=<value> --ip <ip_addr | domain_name> <adapter_name>

Reset target level iSCSI parameter to be inherited from the adapter level:
vicfg-iscsi <conn_options>
--parameter --reset <name> --ip <ip_addr | domain_name> <adapter_name>

List software iSCSI enabled or not enabled:


vicfg-iscsi <conn_options>
--swiscsi --list

Enable software iSCSI:


vicfg-iscsi <conn_options>
--swiscsi --enable

Disable software iSCSI:


vicfg-iscsi <conn_options>
--swiscsi --disable

List iSCSI adapter:


vicfg-iscsi <conn_options>
--adapter --list

vicfg-module - enable configuration of VMkernel module options

SYNOPSIS
vicfg-module [<connection_options>]
[--get-options <module_name> |
--help |
--list |
--set-options "<option> <value>" <module_name> |
--vihost <esx_host> ]

DESCRIPTION

The vicfg-module command supports setting and retrieving VMkernel module options. This command is a vSphere CLI
implementation of the esxcfg-module service console command, but it supports only some of the options esxcfg-
module supports. The command is commonly used when VMware Technical Support, a Knowledge Base article, or
VMware documentation instruct you to do so.

OPTIONS

connection_options
Specifies the target server and authentication information if required. Run vicfg-module --help for a list of
all connection options.
--get-options | -g <module_name>
Returns the option string configured to be passed to the module when it is loaded. This string is not necessarily
the option string currently in use by the module.
--help
Prints a help message for each command-specific and each connection option. Calling the script with no
arguments or with --help has the same effect.
--list | -l
Lists the set of modules on the host (valid for vSphere 4.0 and later).
--set-options | -s "<option>=<value>" <module_name>
Specifies the option string to be passed to the module when the module is loaded.
--vihost | -h
When you run a vSphere CLI command with the --server option pointing to a vCenter Server system, use --
vihost to specify the ESX/ESXi host to run the command against.

EXAMPLES

The following examples assume you are specifying connection options, either explicitly or, for example, by specifying
the server, user name, and password. Use vicfg-module --help for a list of common options including connection
options.
Configure a supported NIC to use NetQueue:
vicfg-module <conn_options> -s "intr_type=2 rx_ring_num=8" s2io

Verify that NetQueue has been configured:


vicfg-module <conn_options> -g s2io

List the set of modules on the host:


vicfg-module <conn_options> -l

vicfg-mpath35 - configure multipath settings for Fibre Channel or iSCSI LUNs

SYNOPSIS
vicfg-mpath35 [OPTIONS]

DESCRIPTION

vicfg-mpath35 provides an interface to configure multipath settings for Fibre Channel or iSCSI LUNs on ESX/ESXi version
3.5 hosts. Use vicfg-mpath for ESX/ESXi 4.0 and later hosts.

OPTIONS

--help
Prints a help message for each command-specific and each connection option. Calling the command with no
arguments or with --help has the same effect.
--list | -l
Lists all LUNs and the paths to these LUNs through adapters on the system. For each LUN, the command
displays the type, internal name, console name, size, and paths, and the policy used for path selection.
--policy | -p
Sets the policy for a given LUN to one of "mru", "rr", or "fixed". Most Recently Used (mru) selects the path most
recently used to send I/O to a device. Round Robin (rr) rotates through all available paths. Fixed (fixed) uses only
the active path. This option requires that you also specify the --lun option.
--state | -s
Sets the state of a given LUN path to either "on" or "off". This option requires that you also specify the --lun
and --path options.
--preferred | -f
Sets the given path to be the "preferred" path for a given LUN. This option requires that you also specify the --
lun and --path options.
--query | -q
Queries a specific LUN for its information and print it. This option requires that you also specify the --lun
option.
--path | -P
Specifies the path to use in other operations. You cannot use this option by itself.
--lun | -L
Specifies the LUN to use in other operations. You cannot use this option by itself.
--detailed | -d
Displays all information about a LUN and its paths including the vml name of the LUN.
--bulk | -b
Shows all LUNs and paths in a format easily parsed by scripts.
--hbas | -a
Prints the list of HBAs that can be identified by a unique ID. This option lists Fibre Channel and iSCSI devices.
Parallel and Block devices do not appear in the list.
--vihost | -h
When you execute this command with --server pointing to a vCenter Server system, you can use --vihost
to specify the ESX/ESXi host to run the command against.

EXAMPLES

List all LUNs and the paths to these LUNs through adapters on the system:
vicfg-mpath35 --server <servername> --username <user name>
--password <password> -l

Set the policy for a specific LUN. Requires --lun is also specified to indicate the LUN to operate on:
vicfg-mpath35 --server <server name> --username <user name>
--password <password> --policy mru --lun vmhba0:8:0

Set the state for a specific LUN path. Requires both --lun and --path are specified. This operation may appear to fail if
there is active I/O on a path that is set to "off":
vicfg-mpath35 --server <server name> --username <user name>
--password <password> --state <on|off> --path <path flag> --lun <lunname>

Set the given path to be the preferred path for the given LUN. Requires both --path and --lun are specified:
vicfg-mpath35 --server <server name> --username <user name>
--password <password> --preferred --path vmhba0:8:0 --lun vmhba0:8:0

Query the information on a specific LUN:


vicfg-mpath35 --server <server name> --username <user name>
--password <password> --query --lun vmhba0:8:0

Indicate which LUN to operate on. You can specify the LUN either with its internal VMkernel vmhba name (vmhbaX:X:X)
or with its vml name as found in /vmfs/devices/disks:
vicfg-mpath35 --server <server name> --username <user name>
--password <pasword> --policy mru --lun vmhba0:8:0

Return a bulk path listing suitable for parsing:


vicfg-mpath35 --server <server name> --username <user name>
--password <password> -b

vicfg-mpath - display path information, change path state


SYNOPSIS
vicfg-mpath [<conn_options>]
[--help |
--list [--path <path> |--device <device>] |
--list-compact [--path <path> |--device <device>] |
--list-map [--path <path> |--device <device>] |
--list-paths [--device <device>] |
--list-plugins |
--state [active|off] ]

DESCRIPTION

The vicfg-mpath command supports listing information about Fibre Channel or iSCSI LUNs and changing a path's state.
Use vicfg-mpath35 when running against ESX/ESXi 3.5 systems. Use the esxcli command for managing pluggable storage
architecture (PSA) and native multipathing (NMP), including path policy modification.

OPTIONS

connection_options
Specifies the target server and authentication information if required. Run vicfg-mpath --help for a list of
all connection options.
--device | -d
Used to filter the list commands to display only information about the specified device.
--help
Prints a help message for each command-specific and each connection option. Calling the script with no
arguments or with --help has the same effect.
--list | -l <path_or_device>
Lists detailed information for all paths on the system or for the specified path or device.
--list-compact | -L <path_or_device>
Lists all paths with abbreviated information.
--list-map | -m <path_or_device>
Lists all paths and the corresponding adapter and device mappings.
--list-paths | -b <device>
Lists all devices with their corresponding paths, or lists paths for the specified device.
--list-plugins | -G
Lists all multipathing plugins loaded into the system. At a minimum, this command returns NMP (Native
Multipathing Plugin). If other MPP plugins have been loaded, they are listed as well. For information about
storage array plugins, see the ESX Configuration Guide and the ESXi Configuration Guide. You manage plugins
with the esxcli command; run esxcli --help to get started and see the vSphere Command-Line Interface
Installation and Scripting Guide for more information.
--path | -P
Used to specify a specific path for operations. The path name may be either the long path UID or the shorter
runtime name of the path. Use this option to filter any of the list commands to a specific path.
--state|-s active|off
Sets the state of a given LUN path to either active or off. This option requires that the --path options is set and
specifies either the path UID or the path runtime name.
If you are changing a path's state, the change operation fails if I/O is active when the path setting is changed.
Reissue the command. You must issue at least one I/O operation before the change takes effect.
--vihost | -h
When you run a vCLI command with the --server option pointing to a vCenter Server system, use --vihost
to specify the ESX/ESXi host to run the command against.

EXAMPLES

The following examples assume you are specifying connection options. Run vicfg-mpath --help for a list of
common options including connection options.
List all paths on the system with their detailed information:
vicfg-mpath <conn_options> -l

List detailed information for the specified path:


vicfg-mpath <conn_options> -l -P ide.vmhba32-ide.0:1-mpx.vmhba32:C0:T1:L0

List a path by specifying its runtime name with its detailed information:
vicfg-mpath <conn_options> -l -P vmhba32:C0:T1:L0

List paths with its detailed information for a specific device:


vicfg-mpath <conn_options> -l -d mpx.vmhba32:C0:T1:L0

List all paths with abbreviated information:


vicfg-mpath <conn_options> -L

List all paths with adapter and device mappings:


vicfg-mpath <conn_options> -m

List all devices with their corresponding paths:


vicfg-mpath <conn_options> -b

List all multipathing plugins loaded into the system:


vicfg-mpath -G

Set the state for a specific path to off. Requires the --path option.
vicfg-mpath <conn_options> --state off --path <path name>

If you are changing a path's state, the change operation fails if I/O is active when the path setting is changed. Reissue
the command. You must issue at least one I/O operation before the change takes effect.

vicfg-nas - manipulate NAS file systems on an ESX/ESXi host.

SYNOPSIS
vicfg-nas [<conn_options>]
[--add --nasserver <server_name> --share <share_name> |
--delete <share_name> |
--help |
--list |
--nasserver <server_name> |
--readonly |
--vihost <esx_host ]

DESCRIPTION

The vicfg-nas command manipulates NAS file systems associated with ESX/ESXi hosts. For more information on working
with NAS file systems, see the ESX Configuration Guide and the ESXi Configuration Guide.
OPTIONS

--add | -a
Adds a new NAS file system to /vmfs/volumes on the ESX/ESXi host. The command adds an entry to the known
NAS file system list, but does not mount the file system. When you use this option, you must also use the --
nasserver|-o and --share|-s options, and must specify a label name for the new file system.
connection_options
Specifies the target server and authentication information if required. Run vicfg-nas --help for a list of all
connection options.
--delete | -d <share_name>
Deletes a NAS file system. This command unmounts the NAS file system and removes it from the list of known
file systems.
--help
Prints a help message for each command-specific and each connection option. Calling the script with no
arguments or with --help has the same effect.
--list | -l
Optional. Lists all known NAS file systems with their mount name, share name, and host name and indicates for
each file system whether it is mounted.
--nasserver | -o <server_name>
Used in conjunction with the --add|-a option to supply the host name for a new NAS file system.
--share | -s <share_name>
Used in conjunction with the --add|-a option to supply the share name of a new NAS file system.
--readonly | -y
Adds the new NAS filesystem with readonly access.
--vihost | -h
When you run a vCLI command with the --server option pointing to a vCenter Server system, use --vihost
to specify the ESX/ESXi host to run the command against.

EXAMPLES

The following examples assume you are specifying connection options, either explicitly or, for example, by specifying
the server, user name, and password. Run vicfg-nas --help for a list of common options including connection
options.
List all known NAS file systems with their mount name, share name, and hostname and indicate whether each is
mounted:
vicfg-nas <conn_options> -l

Add a new NAS file system to the ESX Server. This will add an entry to the known NAS file system list. You must supply
the host name and the share name for the new NAS file system:
vicfg-nas <conn_options> -a -o <nasserver> -s /home FileServerHome

Add a new readonly NAS file system to the ESX Server. This will add an entry to the known NAS file system list. You must
supply the host name and the share name for the new NAS file system:
vicfg-nas <conn_options> -a -y -o <nasserver> -s /home FileServerHome

Delete a NAS file system. The command unmounts the NAS file system and removes it from the list of known file
systems:
vicfg-nas <conn_options> -d FileServerHome

vicfg-nics - get information, set speed and duplex for ESX/ESXi physical NICs
SYNOPSIS
vicfg-nics [<connection_options>]
--auto <nic> |
--duplex [full|half] <nic>
--help |
--list |
--speed [10 | 100 | 1000 | 10000] <nic> |
--vihost <esx_host>]

DESCRIPTION

The vicfg-nics command manages uplink adapters, that is, the Ethernet switches used by an ESX/ESXi host. You can use
vicfg-nics to list the VMkernel name for the uplink adapter, its PCI ID, driver, link state, speed, duplex setting, MAC
address and a short PCI description of the card. You can also specify speed and duplex settings for an uplink adapter.

OPTIONS

--auto | -a <nic>
Sets the NIC to auto-negotiate its speed and duplex settings Requires a NIC parameter.
connection_options
Specifies the target server and authentication information if required. Run vicfg-nics --help for a list of all
connection options.
--duplex | -d [full|half] <nic>
Sets the duplex value at which a given network adapter should run to either full (transmit data in both
directions at the same time) or half (transmit data in one direction at a time). Requires a NIC parameter.
--help
Prints a help message for each command-specific and each connection option. Calling the script with no
arguments or with --help has the same effect.
--list | -l
Lists the NICs in the system and, for each NIC, the PCI bus, driver, speed, duplex information, MAC address, and
a description. Also shows whether the link is up.
--speed | -s <speed> <nic>
Sets the speed at which a given network adapter should run. Valid values for <speed> are 10, 100, 1000, or
10000. Requires a NIC parameter.
--vihost | -h
When you run a vCLI command with the --server option pointing to a vCenter Server system, use --vihost
to specify the ESX/ESXi host to run the command against.

EXAMPLES

The following examples assume you are specifying connection options, either explicitly or, for example, by specifying
the server, user name, and password. Run vicfg-nics --help for a list of common options including connection
options.
List the NICs in the system and print their current and configured speed and duplex settings:
vicfg-nics <conn_options> -l

Set vmknic02 to auto-negotiate its speed and duplex settings:


vicfg-nics <conn_options> -a vmnic02

Set the duplex setting for vmnic0 to full and the speed to 100:
vicfg-nics <conn_options> -d full -s 100 vmnic0

vicfg-ntp - configure the NTP server

SYNOPSIS
vicfg-ntp [connection_options]
[--add <name_or_IP> |
--delete <name_or_IP |
--help |
--list |
--start |
--stop |
--vihost <esx_host>]

DESCRIPTION

The vicfg-ntp command supports specifying the NTP (Network Time Protocol) server for an ESX/ESXi host. Some
protocols, such as Kerberos, must have accurate information about the current time.

OPTIONS

--add | -a
Adds the specified NTP server. You can use the name or IP address to specify the NTP server (IPv6 address valid
for vSphere 4.0 and later).
connection_options
Specifies the target server and authentication information if required. Run vicfg-ntp --help for a list of all
connection options.
--delete | -d
Deletes the specified NTP server. You can use the name or IP address to specify the NTP server (IPv6 address
valid for vSphere 4.0 and later).
--help
Prints a help message for each command-specific and each connection option. Calling the script with no
arguments or with --help has the same effect.
--list | -l
Displays all NTP servers used by the host.
--start | -r
Starts the NTP service on the target host.
--stop | -s
Stops the NTP service on the target host.
--vihost | -h
When you run a vCLI command with the --server option pointing to a vCenter Server system, use --vihost
to specify the ESX/ESXi host to run the command against.

EXAMPLES

The following examples assume you are specifying connection options, either explicitly or, for example, by specifying
the server, user name, and password. Run vicfg-ntp --help for a list of common options including connection
options.
Display the list of NTP servers used by this host:
vicfg-ntp --server <server name> --username <user name>
--password <password> --list

Add a remote NTP server with the specified host name or IP address:
vicfg-ntp --server <server name> --username <user name>
--password <password> --add <ntp-server>

Delete the remote NTP server with the specified host name or IP address:
vicfg-ntp --server <server name> --username <user name>
--password <password> --delete <ntp-server>

Start the NTP service on the host:


vicfg-ntp --server <server name> --username <user name>
--password <password> --start

Stop the NTP service on the host:


vicfg-ntp --server <server name> --username <user name>
--password <password> --stop

vicfg-rescan - scan the LUNs

SYNOPSIS
vicfg-rescan [<connection_options>]
<adapter name>
[--help
--vihost <esx_host>]

DESCRIPTION

Perform a rescan operation each time you reconfigure your storage setup. You can use the vicfg-rescan vSphere CLI or
the vSphere Client to perform a rescan.
See the ESX Configuration Guide and the ESXi Configuration Guide. The Fibre Channel SAN Configuration Guide discusses
rescan on Fibre Channel storage. The iSCSI SAN Configuration Guide discusses rescan on iSCSI storage.
When you rescan an ESX/ESXi host, the command returns only an indication of success or failure and no detailed
information.

OPTIONS

<adapter_name>
Name of the adapter, for example vmhba1.
connection_options
Specifies the target server and authentication information if required. Run vicfg-rescan --help for a list of
all connection options.
--help
Prints a help message for each command-specific and each connection option. Calling the script with no
arguments or with --help has the same effect.
--vihost | -h <esx_host>
When you run a vCLI command with --server pointing to a vCenter Server system, use --vihost to specify
the ESX/ESXi host to run the command against.
EXAMPLES

The following example assumes you are specifying connection options, either explicitly or, for example, by specifying
the server, user name, and password. Run vicfg-rescan --help for a list of common options including connection
options.
Refresh adapter registration. This command needs a adapter name to work, for example, vmhba0 or vmhba1:
vicfg-rescan <conn_options> vmhba0

vicfg-route - get and set routing information for the VMkernel

SYNOPSIS
vicfg-route [<connection_options>]
[--add <route> |
--del <route> |
--help |
--list |
--family [v4 | v6] |
--vihost <esx_host>]
[<gateway>]

DESCRIPTION

The vicfg-route command lists or sets the default IP gateway. Changing the gateway might be required if you move your
ESX/ESXi host to a new physical location. The vicfg-route command supports a subset of the Linux route command's
options.
If you run vicfg-route with no options, the command displays the default gateway. You can use the --family option to
print the default IPv4 or the default IPv6 gateway. By default, the command displays the default IPv4 gateway.

OPTIONS

connection_options
Specifies the target server and authentication information if required. Run vicfg-route --help for a list of
all connection options.
<gateway>
The IP address or the host name of the machine that should be set as the gateway for the VMkernel IP stack.
--add | -a <route>
Adds route to the VMkernel (valid for vSphere 4.0 and later).
To add a route entry and make it the default, run
vicfg-route --add <route> default

--del | -d <route>
Deletes a route entry from the VMkernel (valid for vSphere 4.0 and later).
--help
Prints a help message for each command-specific and each connection option. Calling the script with no
arguments or with --help has the same effect.
--list | -l
Lists configured routes for the VMkernel.
--family | -f v4 | v6
Address family, either v4 for IPv4 or v6 for IPv6. Defaults to v4.
--vihost | -h <esx_host>
When you run a vCLI command with the --server option pointing to a vCenter Server system, use --vihost
to specify the ESX/ESXi host to run the command against.

EXAMPLES

The following examples assume you are specifying connection options, either explicitly or, for example, by specifying
the server, user name, and password. Run vicfg-route --help for a list of common options including connection
options.
List the VMkernel IP stack's default gateway entry:
vicfg-route <connection_options>

Set the VMkernel IP stack's default gateway entry, that is, change the default gateway to a different gateway:
vicfg-route <connection_options> <new_gateway>

Set the VMkernel default gateway to 192.NNN.0.1


vicfg-route <connection_options> 192.NNN.0.1
or
vicfg-route <connection_options> -a default 192.NNN.0.1

Delete a 192.NNN.100.0 route from the VMkernel:


vicfg-route <connection_options> -d 192.NNN.100.0/24 192.168.0.1

Add a route to 2001:10:20:NNN::/64 network through 2001:10:20:NNN::1


vicfg-route <connection_options> -f V6 -a 2001:10:20:NNN::/64 2001:10:20:NNN::1

Set the VMkernel default gateway to 2001:10:20:NNN::1


vicfg-route <connection_options> -f V6 -a default 2001:10:20:NNN::1

Delete the 2001:10:20:NNN:: route from the VMkernel:


vicfg-route <connection_options> -f V6 -d 2001:10:20:NNN::/64 2001:10:20:NNN::1

vicfg-scsidevs - display information about available LUNs.

SYNOPSIS

vicfg-scsidevs [<connection_options>]
[--compact-list |
--device <device> |
--hba-device-list |
--hbas |
--help |
--list |
--query |
--uids |
--vihost <esx_host> |
--vmfs]

DESCRIPTION

The vicfg-scsidevs command displays information about available LUNs on ESX/ESXi 4.x hosts. You can run vicfg-scsidevs
--query and vicfg-scsidevs --vmfs against ESX/ESXi version 3.5. The other options are supported only against ESX/ESXi
version 4.0 and later.
In previous releases of this command-line interface, the corresponding command is vicfg-vmhbadevs.
OPTIONS

connection_options
Specifies the target server and authentication information if required. Run vicfg-scsidevs --help for a list
of all connection options.
--compact-list | -c
Lists all logical devices, each on a single line, with limited information. The information includes the device ID,
device type, size, and plugin and device display name. You can specify the --device option to list information
about a specific device.
--device | -d
Used with other options to specify the device for which you want information.
--hba-device-list | -A
For each HBA, prints a mapping between the HBA and the devices for which it provides paths.
--hbas | -a
Prints HBA devices with identifying information. This includes the adapter ID, driver ID, adapter UID, PCI,
vendor, and model.
--help
Prints a help message for each command-specific and each connection option. Calling the script with no
arguments or with --help has the same effect.
--list | -l
Lists device information for all logical devices on this system. The information includes the name (UUID), device
type, display name, and multipathing plugin. You can specify the --device option to list information about a
specific device.
--query | -q
Prints mappings in 2.5 compatibility mode to mimic a call to vmkpcidivy -q vmhba_devs.
--uids | -u
Lists the primary UID for each device and any other UIDs (aliases) for each UID. You can specify the --device
option to list information about a specific device.
--vihost | -h
When you run a vCLI command with the --server option pointing to a vCenter Server system, use --vihost to
specify the ESX/ESXi host to run the command against.
--vmfs | -m
Prints mappings for each VMFS volume to its corresponding partition, path to that partition, VMFS UUID, extent
number, and volume names.

EXAMPLES

The following examples assume you are specifying connection options, either explicitly or, for example, by specifying
the server, user name, and password. Run vicfg-scsidevs --help for a list of common options including
connection options.
List all logical devices known on this system with detailed information:
vicfg-scsidevs <conn_options> -l

List all logical devices with abbreviated information:


vicfg-scsidevs <conn_options> -c

List all device unique identifiers with their primary name:


vicfg-scsidevs <conn_options> -u
List a specific logical device with its detailed information:
vicfg-scsidevs <conn_options -l -d mpx.vmhba32:C0:T1:L0

Print mappings for VMFS volumes to the corresponding partition, path to that partition, VMFS uuid, extent number and
volume names:
vicfg-scsidevs <conn_options> -m

Print HBA devices with identifying information:


vicfg-scsidevs <conn_options> -a

Print a mapping between HBAs and the devices it provides paths to:
vicfg-scsidevs <conn_options> -A

vicfg-snmp - configure the SNMP service

SYNOPSIS
vicfg-snmp [<connection_options>]
[--communities <comm_list> |
--disable |
--enable |
--help |
--hwsrc |
--notraps |
--port <port_number> |
--reset |
--show |
--targets <targets> |
--test |
--vihost <esx_host>]

DESCRIPTION

Simple Network Management Protocol (SNMP) allows management programs to monitor and control networked
devices. The Basic System Administration manual discusses using SNMP in your vSphere environment in some detail.
The vSphere Command-Line Interface Scripting Guide explains setup with vSphere CLI commands.

OPTIONS

--communities | -c <comm1>[,...]
Specifies communities, separated by commas. The settings specified using this option overwrite any previous
settings.
connection_options
Specifies the target server and authentication information if required. Run vicfg-snmp --help for a list of all
connection options.
--disable | -D
Stops the SNMP service on the host.
--enable | -E
Starts the SNMP service on the host.
--help
Prints a help message for each command-specific and each connection option. Calling the script with no
arguments or with --help has the same effect.
--hwsrc | -y
Allows you to specify where to source hardware events originating from IPMI sensors or from CIM indications.
Specify either indications or sensors.
--notraps | -n <port_number>
Comma-separated list of trap OIDs (object identifiers) for traps not to be sent by the agent. Use --notraps
reset to clear the list.
--port | -p <port_number>
Sets the port used by the SNMP agent. The default is UDP 161. This is the port that the SNMP service uses to
listen on for polling requests, such as GET requests. You can also configure the port that the SNMP agent sends
data to on the target system using the --targets option. That port is UDP 162 by default.
--reset | -r
Clears all previously-specified communities and targets.
--show | -s
Displays the current SNMP configuration.
--targets | -t <hostname[@port]> </community>[,...]
Sets the destination for (notifications) traps. You can specify multiple targets, separated by commas.
The settings specified using this flag overwrite any previous settings. For vSphere 4.0 and later, IPv6 addresses
are valid.
--test | -T
Sends a test notification that can be used to validate the SNMP configuration to the configured target or targets.
--vihost | -h
When you run a vSphere CLI command with the --server option pointing to a vCenter Server system, use --
vihost to specify the ESX/ESXi host to run the command against.

EXAMPLES

The following examples assume you are specifying connection options, either explicitly or, for example, by specifying
the server, user name, and password. Run vicfg-snmp --help for a list of common options including connection options.
Display the SNMP agent configuration:
vicfg-snmp <conn_options> -s

Set the community for the SNMP agent to public:


vicfg-snmp <conn_options> -c public

Set my_comm1 and my_comm2 as the communities, overwriting any existing communities.
vicfg-snmp <conn_options> -c my_comm1,my_comm2

Enable the SNMP service:


vicfg-snmp <conn_options> -E

Disable the SNMP service:


vicfg-snmp <conn_options> -D

Set the SNMP agent port to port 163:


vicfg-snmp <conn_options> -p 163

vicfg-syslog - get and set syslog server configuration

SYNOPSIS
vicfg-syslog [<connection_options>]
[--help |
--setport <port> |
--setserver <name_or_ip> |
--show |
--vihost <esx_host> ]

DESCRIPTION

The vicfg-syslog command specifies a remote syslog server for an ESXi host.
You cannot run this command against an ESX host. ESX administrators can edit the syslog configuration file to customize
the syslog server.
The Basic System Administration manual discusses system logs in more detail and explains how to set them up using the
vSphere Client

OPTIONS

connection_options
Specifies the target server and authentication information if required. Run vicfg-syslog --help for a list of
all connection options.
--help
Prints a help message for each command-specific and each connection option. Calling the script with no
arguments or with --help has the same effect.
--setport | -p <port>
Sets the port number for the syslog server. Can be used with --setserver.
--setserver | -s <host_or_IP>
Set the host name or IP address of the syslog server. Can be used with --setport>.
--show | -i
Displays the syslog server configuration if a syslog server has been set up.
--vihost | -h <esx_host>
When you run a vSphere CLI command with the --server option pointing to a vCenter Server system, use --
vihost to specify the ESX/ESXi host to run the command against.

EXAMPLES

The following examples assume you are specifying connection options, either explicitly or, for example, by specifying
the server, user name, and password. Run vicfg-syslog --help for a list of common options including connection
options.
Display the syslog server configuration:
vicfg-syslog <conn_options> -i

Set the host name of the syslog server:


vicfg-syslog <conn_options> -s <syslog server>

Set the port used by the syslog server:


vicfg-syslog <conn_options> -p <port>

vicfg-user - manage users and groups

SYNOPSIS
vicfg-user <[conn_options>] -e <user |- group> |-o <add | modify | delete | list> [options]

Note: The syntax of this command differs from other vSphere CLI commands.

DESCRIPTION

An ESX/ESXi system grants access to its resources when a known user with appropriate permissions logs on to the
system with a password that matches the one stored for that user. The vicfg-user command supports creating,
modifying, deleting, and listing local direct access users and groups of users on an ESX/ESXi host. You cannot run this
command against a vCenter Server system.
User management is discussed in detail in the ESX Configuration Guide, the ESXi Configuration Guide, and the Basic
System Administration document.

OPTIONS

--addgroup | -g <group_list>
Comma-separated list of groups to add the user to.
--adduser | -u <user_list>
Comma-separated list of users to add to a specified group.
conn_options
Specifies the target server and authentication information if required. Run vicfg-user --help for a list of all
connection options.
--entity | -e [group | user]
Required. Entity to perform the operation on (user | group).
--help
Prints a help message for each command-specific and each connection option. Calling the script with no
arguments or with --help has the same effect.
--group | -d <group_name>
Group name of the group.
--groupid | -D <group_ID>
Group ID of the group.
--login | -l <login_ID>
Login ID of the user.
--newpassword | -p <password>
Password for the target user.
--newuserid | -i <UUID>
UID for the target user.
--newusername | -n <name>
User name for the target user.
--operation | -o [add | modify | delete | list]
Required. Operation to perform. Specify add, modify, delete, or list.
--promptpassword
Prompts for a password when you make a change to a user.
--removegroup | -G <group_list>
Comma-separated list of groups to remove the target user from.
--removeuser | -U <user_list>
Comma-separated list of users to be removed from the target group.
--role | -r [admin|read-only|no-access]
Role for the target user or group. Specify admin, read-only, or no-access.
--shell | -s [yes|no]
Grant shell access to the target user. Default is no shell access. Use this command to change the default, or to
revoke shell access rights after they have been granted. Valid values are yes and no.
This option is supported only for ESX. The option is meaningless for ESXi.

EXAMPLES

The following examples assume you are specifying connection options, either explicitly or, for example, by specifying
the server, user name, and password. Run vicfg-user --help for a list of common options including connection
options.
Add a user with login ID user27:
vicfg-user <conn_options> -e user -o add -l user27 -p 27_password

Modify password, user ID, and user name for the user with login ID user27:
vicfg-user.pl <conn_options> -e user -o modify -l user27 -p 27_password -i <new user id> -n <new user
name>Add the user with user name user27 to a group test:
vicfg-user <conn_options> -e user -o modify -l user27 -g test

Assign the role read-only to user27 and prompt for a password.


vicfg-user <conn_options> -e user -o modify -l user27 --role read-only --promptpassword

Remove the user with user name user27:


vicfg-user <conn_options> -e user -o delete -l user27

Add group42 as a group:


vicfg-user <conn_options> -e group -o add -d group42 -D 501

Add a user "test" to group42:


vicfg-user <conn_options> -e group -o modify -d group42 -u test

Remove group group42


vicfg-user <conn_options -e group -o delete -d group42

List groups and users:


vicfg-user <conn_options> -e group -o list

List users in group42:


vicfg-user <conn_options -e group -o list -d group42

Add group group42, with group ID 501 and role read-only:


vicfg-user.pl <conn_options> --entity group --operation add --group group42 - -groupid 501 --role read-only

vicfg-vmknic - configure virtual network adapters

SYNOPSIS
vicfg-vmknic [conn_options]
[--add --ip<address> --netmask <netmask> <port-group-name> |
--delete <nic_name> |
--disable-vmotiion <portgroup> |
--dvs-name <dvs> |
--dvport_id <port_id> |
--enable-ipv6 [true|false] |
--enable-vmotion <portgroup> |
--help |
--ip <address> |
--list |
--mtu <mtu> |
--netmask <netmask> |
--portgroup <port_group> |
--tso |
--unset-ip |
--vihost <esx_host> ]

DESCRIPTION

The vicfg-vmknic command configures VMkernel NICs (virtual network adapters).


Use the esxcli swisis nic command to specify NIC bindings for VMkernel NICs.

OPTIONS

conn_options
Specifies the target server and authentication information if required. Run vicfg-vmknic --help for a list of
all connection options.
--add | -a
Adds a VMkernel NIC to the system. You must specify the IP address using --ip, the netmask, and the port group
name. When the command completes successfully, the newly added VMkernel NIC is enabled.
You cannot specify the dvsName and dvportId parameters with this option.
--delete | -d <port_group>
Delete the VMkernel NIC on the given port group. The port group name is the same as the VMkernel NIC name.
--disable-vmotion | -u <port_group>
Disables VMotion for the VMkernel NIC on a specified port group.
--dvs-name | -s
Specifies the distributed virtual switch (DVS) name to use as a connection point. DVS is also known as vNetwork
Distributed Switch (VDS). Requires that --dvport-id is also specified.
--dvport-id | -v
Specifies the distributed virtual port ID of the connection point. Requires that --dvs-name is also specified.
--enable-ipv6 | -6 true | false
Enables or disables IPv6 for this VMkernel NIC for the next boot. Valid for vSphere 4.0 and later.
--enable-vmotion | -E <port_group>
Enables VMotion for the VMkernel NIC on a specified port group. By default, VMotion is disabled for a port
group. To perform migration with VMotion over the network, you have to enable VMotion.
--help
Prints a help message for each command-specific and each connection option. Calling the script with no
arguments or with --help has the same effect.
--ip | -i <ip_address> | DHCP
Sets the IP address for this VMkernel NIC. If you specify DHCP, the VMkernel must support DHCP. IP address can
be in one of the following format:
* <X.X.X.X> - Use the specified static IPv4 address
* DHCP - Enable IPv4 DHCP for address
* <X:X:X::/X> - Use the specified static IPv6 address (valid for vSphere 4.0 and later)
* DHCPV6 - Enable the IPv6 DHCP address (valid for vSphere 4.0 and later)
* AUTOCONF - Enable the IPv6 address advertised by the router (valid for vSphere 4.0 and later)
--list | -l
Lists all VMkernel NICs on the system. The list contains the network information, port group, MTU, and current
state for each virtual network adapter in the system.
--mtu | -m <mtu>
MTU (maximum transmission unit) for the interface being created (valid for vSphere 4.0 and later).
--netmask | -n <netmask>
IP netmask (X.X.X.X) to be used for the virtual network adapter. When you set a netmask, you must specify the -
-ip option in the same command.
--portgroup | -p
Specifies the port group to use as connection point.
--tso | -t
Disables TCP Segment Offloading (TSO) for the VMkernel NIC being created. By default, TSO is enabled for a
virtual NIC. When you specify this option, TSO is disabled for the virtual NIC that is being created (valid for
vSphere 4.0 and later).
--unset-ip | -U
Unsets the IP address for this VMkernel NIC (valid for vSphere 4.0 and later). The address can have one of the
following format:
* <X:X:X::/X> - Remove the specified IPv6 address
* DHCPV6 - Disable the IPv6 DHCP address
* AUTOCONF - Disable the IPv6 address advertised by the router.
--vihost | -h
When you run a vSphere CLI command with the --server option pointing to a vCenter Server system, use --vihost
to specify the ESX/ESXi host to run the command against.

EXAMPLES

The following examples assume you are specifying connection options, either explicitly or, for example, by specifying
the server, user name, and password. Run vicfg-vmknic --help for a list of common options including connection options.
Add a VMkernel NIC to the system:
vicfg-vmknic <conn_options> -a --ip <IP address> -n <net mask> "VMkernel NIC Name"

Delete a VMkernel NIC:


vicfg-vmknic <conn_options> -d "VMkernel NIC 37"

Add a VMkernel NIC to the system:


vicfg-vmknic <conn_options> -a --ip <IP address> -n <net mask> --dvs-name "dvs-001" --dvport-id 1

Delete a VMkernel NIC:


vicfg-vmknic <conn_options> -d --dvs-name "dvs-001" --dvport-id 1

List all the VMkernel NICs:


vicfg-vmknic <conn_options> -l

Modify a VMkernel NIC's IP address and netmask:


vicfg-vmknic <conn_options --ip <IP address> -n <net mask> "VMkernel NIC 37"

Set the VMkernel NIC to use DHCP:


vicfg-vmknic <conn_options> --ip DHCP "VMkernel NIC 37"

Enable IPv6 for the VMkernel NIC for the next boot:
vicfg-vmknic VMkernel --enable-ipv6 true

Enable VMotion for the VMkernel NIC on a specified portgroup:


vicfg-vmknic <conn_options> --enable-vmotion "portgroup 42"

Disable VMotion for the VMkernel NIC on a specified portgroup:


vicfg-vmknic <conn_options> --disable-vmotion "portgroup 42"

vicfg-volume - Managing LVM snapshot or replica volumes.

SYNOPSIS
vicfg-volume [<connection_options>]
[--help |
--list |
--persistent-mount <VMFS-UUID|label> |
--resignature <VMFS-UUID|label> |
--umount <VMFS-UUID|label> |
--vihost <esx_host>]

DESCRIPTION

The vicfg-volume command supports resignaturing a snapshot volume and mounting and unmounting the volume. You
can also make the mounted volume persistent across reboots and query a list of snapshot volumes and original
volumes.
The ESX Configuration Guide and the ESXi Configuration Guide discuss volume resignaturing in detail.

OPTIONS

connection_options
Specifies the target server and authentication information if required. Run vicfg-volume --help for a list of
all connection options.
--help
Prints a help message for each command-specific and each connection option. Calling the script with no
arguments or with --help has the same effect.
--list | -l
Lists all volumes that have been detected as snapshots or replicas.
--persistent-mount | -M [<VMFS-UUID>|<label>]
Mounts a snapshot/replica volume persistently if its original copy is not online.
--resignature | -r [<VMFS-UUID>|<label>]
Resignatures a snapshot/replica volume.
--umount | -u [<VMFS-UUID>|<label>]
Unmounts a snapshot/replica volume.
--vihost | -h
When you run a vCLI command with the --server option pointing to a vCenter Server system, use --vihost
to specify the ESX/ESXi host to run the command against.

EXAMPLES

The following examples assume you are specifying connection options, either explicitly or, for example, by specifying
the server, user name, and password. Run vicfg-volume --help for a list of common options including connection
options.
List all volumes that have been detected as snapshots/replicas:
vicfg-volume <conn_options> -l

Mount a snapshot or replica volume persistently:


vicfg-volume <conn_options> -M my_sample_vol

Resignature a snapshot or replica volume:


vicfg-volume <conn_options -r my_sample_vol

Unmount a snapshot or replica volume:


vicfg-volume conn_options -u 48c826a3-12815d67-0ac6-0030485cd343

vicfg-vswitch - create and configure virtual switches and port groups

SYNOPSIS
vicfg-vswitch [<connection_options>]
[ --add <switch_name> |
--check <vswitch_name> |
--delete <vswitch_name> |
--get-cdp <vswitch_name> |
--help |
--link <physical_nic> <vswitch_name> |
--list |
--mtu <vswitch_name> |
--set-cdp <vswitch_name> |
--unlink <physical_nic> <vswitch_name> |
--vihost <esx_host ]
vicfg-vswitch [<connection_options>]
[--add_pg <portgroup> <vswitch_name> |
--check-pg <port_group> <vswitch_name> |
--del-pg <port_group> <vswitch_name> |
--help |
--list |
--vihost <esx_host |
--vlan --pg <port_group> ]
vicfg-vswitch [<connection_options>]
[--add-dvp-uplink <adapter_name> --dvp <DVPort_id> <dvswitch_name> |
--del-dvp-uplink <adapter_name> --dvp <DVPort_id> <dvswitch_name> |
--help |
--vihost <esx_host ]
vicfg-vswitch [<connection_options>]
[--add-pg-uplink <adapter_name> --pg <port_group> <vswitch_name> |
--del-pg-uplink <adapter_name> --pg <port_group> <vswitch_name> |
--help |
--vihost <esx_host ]

DESCRIPTION

The vicfg-vswitch command adds or removes virtual switches or modifies virtual switch settings. A virtual switch is an
abstracted network device. It can route traffic internally between virtual machines and link to external networks. The
ESX Configuration Guide and the ESXi Configuration Guide discuss virtual switches, vNetwork Distributed Switches (vDS),
port groups, and vDS port groups. The vSphere CLI manual presents some sample scenarios.
By default,each ESX/ESXi host has a single virtual switch called vSwitch0.

OPTIONS

--add | -a <switch_name>
Adds a new virtual switch.
--add-pg | -A <portgroup> <vswitch_name>
Adds a port group to the specified virtual switch.
--add-dvp-uplink | -P
Adds an uplink adapter to a distributed virtual port (DVP).
--add-pg-uplink | -M
Adds an uplink adapter to a port group (valid for vSphere 4.0 and later). This command fails silently if the uplink
adapter does not exist.
--check | -c <vswitch_name>
Checks whether a virtual switch exists. Prints 1 if the switch exists and prints 0 otherwise. Use the virtual switch
name, e.g. vSwitch0 or vSwitch1, to specify the virtual switch.
--check-pg | -C <port_group> <vswitch_name>
Checks whether the specified port group exists or not.
connection_options
Specifies the target server and authentication information if required. Run vicfg-vswitch --help for a list
of all connection options.
--delete | -d <vswitch_name>
Deletes a virtual switch. Running the command with this option fails if any ports on the virtual switch are in use
by VMkernel networks, vswifs, or virtual machines.
--del-pg | -D <port_group> <vswitch_name>
Deletes a port group from the virtual switch. Running the command with this option fails if the port group is in
use, for example, by a virtual machine or a VMkernel network.
--del-dvp-uplink | -Q <adapter_name > --dvp <DVPort_id> <dvswitch_name> >
Deletes an uplink adapter from a port on a DVS (distributed virtual switch), also called vNetwork Distributed
Switch (vDS). Valid for vSphere 4.0 and later.
--del-pg-uplink | -N <adapter_name > <port_group> <dvswitch_name>
Deletes an uplink adapter from a port group. Valid for vSphere 4.0 and later.
--dvp | -V
Name of a distributed virtual port. Used in conjunction with other options. Valid for vSphere 4.0 and later.
--get-cdp | -b <vswitch_name>
Prints the current CDP (Cisco Discovery Protocol) setting for this virtual switch (valid for vSphere 4.0 and later).
--help
Prints a help message for each command-specific and each connection option. Calling the script with no
arguments or with --help has the same effect.
--link | -L <physical_nic> <vswitch_name>
Adds an uplink adapter (physical NIC) to a virtual switch. Running the command with this option attaches a new
unused physical network adapter to a virtual switch.
--list | -l
Lists all virtual switches and their port groups.
--mtu | -m <vswitch_name>
Sets the MTU (maximum transmission unit) of the virtual switch. This option affects all physical NICs assigned to
the virtual switch.
--pg | -p <port_group>
Provides the name of the port group for the --vlan option. Specify ALL to set VLAN IDs on all port groups of a
virtual switch.
--set-cdp | -B <vswitch_name> [down | listen | advertise | both]
Sets the CDP status for a given virtual switch (valid for vSphere 4.0 and later). To set, specify down, listen,
advertise, or both.
--unlink | -U <physical_nic> <vswitch_name>
Removes an uplink adapter from a virtual switch. An uplink adapter corresponds to a physical Ethernet adapter
to which the virtual switch is connected. If you remove the last uplink adapter, you lose physical network
connectivity for that switch.
--vihost | -h <esx_host>
When you run a vSphere CLI command with the --server option pointing to a vCenter Server system, use --
vihost to specify the ESX/ESXi host to run the command against.
--vlan | -v --pg <port_group>
Sets the VLAN ID for a specific port group of a virtual switch. Setting the option to 0 disables the VLAN for this
port group. If you specify this option, you must also specify the --pg option.

EXAMPLES

The following examples assume you are specifying connection options, either explicitly or, for example, by specifying
the server, user name, and password. Run vicfg-vswitch --help for a list of common options including connection
options.
Add a new virtual switch:
vicfg-vswitch <conn_options> -a <vswitch name>

Delete the virtual switch. This will fail if any ports on the virtual switch are still in use by VMkernel networks, vswifs, or
virtual machines:
vicfg-vswitch <conn_options> -d <vswitch name>

List all virtual switches and their portgroups:


vicfg-vswitch <conn_options -l

Add an uplink adapter to a virtual switch:


vicfg-vswitch <conn_options> -L <physical adapter name> <vswitch name>

Remove an uplink adapter from a virtual switch:


vicfg-vswitch <conn_options> -U <physical adapter name> <vswitch name>

Check whether a virtual switch exists:


vicfg-vswitch <conn_options> --check <vswitch name>

Add a new portgroup to the virtual switch:


vicfg-vswitch <conn_options> -A <port group name> <vswitch name>

Delete a portgroup from the virtual switch:


vicfg-vswitch <conn_options> -D <port group name> <vswitch name>
Check whether a port group exists:
vicfg-vswitch <conn_options> -C <valid portgroup name> <vswitch name>

Add an uplink adapter to a port group:


vicfg-vswitch <conn_options> -M <physical adapter name> -p <port group name> <vswitch name>

Remove an uplink adapter from a port group:


vicfg-vswitch <conn_options> -N <physical adapter name> -p <port group name> <vswitch name>

Print the current CDP setting for the virtual switch:


vicfg-vswitch <conn_options> --get-cdp <vswitch name>

vifs - perform file system operations on remote hosts

SYNOPSIS
vifs [<connection_options>]
[--copy <source> <target> |
--dir <remote_dir> |
--help |
--force |
--get <remote_path> <local_path> |
--listdc |
--listds [--dc <datacenter>] |
--mkdir <remote_dir> |
--move <source> <target> |
--put <local_path> <remote_path> |
--rm <remote_path> |
--rmdir <remote_dir> ]

DESCRIPTION

The vifs command performs common operations such as copy, remove, get, and put on files and directories. The
command is supported against ESX/ESXi hosts but not against vCenter Server systems.
Note: While there are some similarities between vifs and DOS or Unix file system management utilities, there are also
many differences. For example, vifs does not support wildcard characters or current directories and, as a result, relative
path names. Use vifs only as documented.

OPTIONS

connection_options
Specifies the target server and authentication information if required. Run vifs --help for a list of all
connection options
--copy | -c <source> <target>
Copies a file in a datastore to another location in a datastore. The <source> must be a remote source path, the
<target> a remote target path or directory. Use the --force option to replace existing destination files.
--dir | -D <remote_dir>
Lists the contents of a datastore or host directory.
--help
Prints a help message for each command-specific and each connection option. Calling the command with no
arguments or with --help has the same effect.
--force | -f
Overwrites the destination file. Use with --copy and --move.
--get | -g <remote_path> <local_path>
Downloads a file from the ESX/ESXi host to the machine on which you run the vCLI commands. This operation
uses HTTP GET.
--listdc | -c
Lists the datacenter paths available on an ESX/ESXi system.
--listds | -S
Lists the datastore names on the ESX/ESXi system. When multiple datacenters are available, you can use the --
dc|-Z <datacenter> argument to specify the name of the datacenter from which you want to list the
datastore.
--mkdir | -M <remote_dir>
Creates a directory in a datastore. This operation fails if the parent directory of remote_dir does not exist.
--move | -m <source> <target>
Moves a file in a datastore to another location in a datastore. The <source> must be a remote source path, the
<target> a remote target path or directory. The --force option replaces existing destination files.
--put | -p <local_path> <remote_path>
Uploads a file from the machine on which you run the vCLI commands to the ESX/ESXi host. This operation uses
HTTP PUT. This command can replace existing host files but cannot create new files.
--rm | -r <remote_path>
Deletes a file or a directory.
--rmdir | -r <remote_dir>
Deletes a datastore directory. This operation fails if the directory is not empty.

EXAMPLES

The following examples assume you are specifying connection options, either explicitly or, for example, by specifying
the server, user name, and password. Run vifs --help for a list of common options including connection options.
Copy a file to another location:
vifs <connection_options> -c "[StorageName] VM/VM.vmx" "[StorageName] VM_backup/VM.vmx"

List all the datastores:


vifs <connection_options> -S

List all the directories:


vifs --server <connection_options> -D "[StorageName] vm"

Upload a file to the remote datastore:


vifs <connection_options> -p "tmp/backup/VM.pl"
"[StorageName] VM/VM.txt" -Z "ha-datacenter"

Delete a file:
vifs <connection_options> -r "[StorageName] VM/VM.txt" -Z "ha-datacenter"
vifs <connection_options> -rmdir "[StorageName] VM/VM.txt" -Z "ha-datacenter"

List the paths to all datacenters available in the server:


vifs <connection_options> -C

Download a file on the host to a local path:


vifs <connection_options> -g "[StorageName] VM/VM.txt"
-Z "ha-datacenter" "tmp/backup/VM.txt"

Move a file to another location:


vifs <connection_options> -m "[StorageName] VM/VM.vmx"
"[StorageName] vm/vm_backup.vmx" -Z "ha-datacenter"

Remove an existing directory:


vifs <connection_options> -R "[StorageName] VM/VM" -Z "ha-datacenter"
vifs <connection_options> --rm "[StorageName] VM/VM" -Z "ha-datacenter"

vihostupdate35 - manage software installation packages on a VMware Infrastructure 3.5 host using vSphere
CLI 4.0 and later.

SYNOPSIS
vihostupdate35 [<connection_options>]
[ --help |
--install [--bundle <zip_location>|--metadata <zip_location>] |
--query |
--remove <bulletin> |
--scan [--bundle <location>|--metadata <zip_location>]]

DESCRIPTION

vihostupdate35 provides an interface to list installed packages on a host, scan for packages that apply to a host, install
packages in a specified directory, unpack a downloaded update, and install an update package.
Run this command only against ESX/ESXi version 3.5 hosts. Run vihostupdate agains ESX/ESXi 4.0 and later hosts.

OPTIONS

--bundle | -b
Location of the offline bundle. Use either -b or -m but not both.
connection_options
Specifies the target server and authentication information if required. Run vihostupdate35 --help for a list
of all connection options.
--force | -f
Always reboot the host after a successful host update.
--help
Prints a help message for each command-specific and each connection option. Calling the command with no
arguments or with --help has the same effect.
--install | -i
Installs an update package from a given directory.
--metadata | -m
Specifies the location of the depot metadata.xml ZIP file that contains information about the update bundle.
Use either -b or -m, not both.
--query | -q
Lists installed packages on the host.
EXAMPLES

Query host for installed packages:


vihostupdate35 <connection_options> -q

Unpack and install the update:


vihostupdate35 <connection_options> -i -b <bundle zip file>

Unpack a zip bundle containing the update but do not install the update:
vihostupdate35 <connection_options> -b <bundle zip file>

Install the update using a metadata file:


vihostupdate35 <connection_options> -i -m <bundle zip file>/metadata.xml

vihostupdate - manage software installation packages on an ESX/ESXi host.

SYNOPSIS
vihostupdate [<connection_options>]
[ --help |
--install [--bundle <zip_location>|--metadata <zip_location>] |
--list [--bundle <zip_location>|--metadata <zip_location>] |
--query |
--remove <bulletin> |
--scan [--bundle <location>|--metadata <zip_location>]]

DESCRIPTION

The vihostupdate command applies software updates to ESX/ESXi images and installs and updates ESX/ESXi extensions
such as VMkernel modules, drivers, and CIM providers.
The vihostupdate command works with bulletins. Each bulletin consists of one or more vSphere bundles and addresses
one or more issues. A bulletin is considered to be included in another bulletin if every vSphere bundle in the first
bulletin meets one of these criteria:
• The vSphere bundle is included in the second bulletin.
• The vSphere bundle is obsoleted by another bundle in the second bulletin.
Towards the end of a release cycle, bulletins include a large number of other bulletins. Bulletins are available in bundles
and in depots with associated metadata.zip files.
• If you use offline bundles, all patches and corresponding metadata are available as one ZIP file.
• If you use metadata, the metadata.zip file points to metadata. The metadata describes the location of the files.
The command supports querying software installed on a host, listing software in a patch, scanning for bulletins that
apply to a host, and installing all or selective bulletins in the patch. You can specify a patch by using a bundle ZIP file or
the metadata ZIP file of a depot. The depot can be on the remote server, or you can download a bundle ZIP file and use
a local depot.
vihostupdate supports https://, http://, and ftp:// downloads. You can specify the protocols in the download URL for the
bundle or metadata file.
See the ESXi Upgrade Guide for some additional information. For more information about installing, removing, and
updating 3rd-Party extensions in vSphere 4.0, see the Setup Guide. An example is in the EXAMPLES section below.
Important: Do not specify -b or -m more than once. If you do, the command only processes the last file that is specified.
You can specify a comma-separated list of bundles with --install but not with other options. That might be necessary if
you want to install a VMware bundle and a third-party bundle.
OPTIONS

--bulletin | -B <bulletin_list>
Bulletins to install. Use this option together with --bundle or --metadata.
Use a comma-separated list, for example, bulletin1,bulletin2. If this option is not specified, vihostupdate
installs all bulletins.
--bundle | -b <location>
Location of the offline bundle. Use either -b or -m but not both. You can specify a list of bundles separated by
commas but not spaces. That might be necessary if you want to install a VMware bundle and a third-party
bundle. The bundles can be local (e.g. C:\bundle1.zip, C:\bundle2.zip) or remote (e.g.
http://<server>/bundle1.zip, http://<server>/bundle2.zip).
connection_options
Specifies the target server and authentication information if required. Run vihostupdate --help for a list of
all connection options.
--help
Prints a help message for each command-specific and each connection option. Calling the command with no
arguments or with --help has the same effect.
--install | -i [--bundle <location> | --metadata <zip_location>]
Installs the host with selective bulletins from the bundle or the depot. Requires either -b or -m, but not both.
You can specify this parameter only once.
--list | -l [--bundle <location> | --metadata <zip_location>]
Lists the bulletins in the specified bundle or depot. Requires either -b or -m but not both.
--metadata | -m <zip_location>
Specifies the location of the depot metadata.xml ZIP file that contains information about the update bundle.
Use either -b or -m, not both.
--query | -q
Displays all bulletins that are already installed on the host.
--remove | -r <bulletin>
Removes the specified bulletin from the host.
Use this option for removing bulletins that are third-party or VMware extensions. Do NOT remove bulletins that
are VMware patches or updates.
--scan | -s [--bundle <location> | --metadata <zip_location>]
Scans the host for the bundle or the depot for applicable bulletins. Requires either -b or -m but not both.

EXAMPLES

The following examples assume you are specifying connection options, either explicitly or, for example, by specifying
the server, user name, and password. Run vihostupdate --help for a list of common options including connection
options.
You can update an ESX/ESXi host using bundles by running the following commands in sequence:
1. Find out which bulletins are installed on your ESX/ESXi host
vihostupdate.pl <conn_options --query
2. Find out which bulletins are available in the bundle
vihostupdate.pl <conn_options> --list --bundle http>//<webserver>/rollup.zip
3. Find out which bulletins in the bundle are applicable to your ESX/ESXi host.
vihostupdate.pl <conn_options> --scan --bundle http://<webserver>/rollup.zip
4. Install all or some bulletins from the bundle on the ESX/ESXi host. The ESX/ESXi host is updated to the specified
patch level.
vihostupdate.pl <conn_options> --install --bundle http://<webserver>/rollup.zip
5. If necessary, you can remove individual bulletins. Use this option only for removing bulletins that are third-party
or VMware extensions. Do not remove bulletins that are VMware patches or updates.
vihostupdate.pl <conn_options> --remove --bulletin bulletin1
You can update your ESX/ESXi host using depots by running the following commands in sequence:
1. List all bulletins in the depot given the metadata.zip file location.
vihostupdate.pl --list --metadata http>//<webserver>/depot/metadata.zip
2. Scan the depot for bulletins that are applicable to the host.
vihostupdate.pl --scan --metadate http://<webserver>/depot/metadata.zip
3. Install bulletins in the depot on the hos.
o To install all bulletins:
vihostupdate.pl --install --metadate http://<webserver>/depot/metadata.zip
o To install selected bulletins, use a comma-separated list. Spaces after the commas are not supported.
vihostupdate.pl --install --metadate http://<webserver>/depot/metadata.zip --
bulletin bulletin1,bulletin
You can deploy a third-party bundle that you have downloaded on your web server, for example:
vihostupdate.pl <conn_options> --install --bundle
https://<3rdParty_webserver>/Cisco_Swordfish.zip

vmkfstools - vSphere CLI for managing VMFS volumes.

SYNOPSIS
vmkfstools <conn_options> <options> <target>

If <target> is a file system, <options> can be one of the following:


--createfs [blocksize]kK|mM --setfsname <fsname>
--queryfs
--extendfs <span_partition> <head_partition>

If <target is a virtual disk, <options> can be one of the following:


--clonevirtualdisk
--createdrm
--createdrmpassthru
--createvirtualdisk
<size>kK|mM|gG
--adaptertype <type>
--diskformat <format> <location>
--deletevirtualdisk
--diskformat
--extendvirtualdisk
--geometry
--inflatedisk
--querydrm
--rescanvmfs
--renamevirtualdisk <oldName> <newName>
--writezeros
DESCRIPTION

You use the vmkfstools vSphere CLI to create and manipulate virtual disks, file systems, logical volumes, and physical
storage devices on an ESX/ESXi host. You can use vmkfstools to create and manage a virtual machine file system (VMFS)
on a physical partition of a disk and to manipulate files, such as virtual disks, stored on VMFS-3 and NFS. You can also
use vmkfstools to set up and manage raw device mappings (RDMs).

OPTIONS

GENERAL OPTIONS

connection_options
Specifies the target server and authentication information if required. Run vmkfstools --help for a list of all
connection options.
--help
Prints a help message for each command-specific and each connection option. Calling the script with no
arguments or with --help has the same effect.
--vihost | -h <esx_host>
When you execute a vCLI with the --server option pointing to a vCenter Server system, use --vihost to
specify the ESX/ESXi host to run the command against.
FILE SYSTEM OPTIONS

--createfs | -C vmfs3 -b | --blocksize -S | --setfsname <fsName> <partition>


Creates a VMFS3 file system on a specified partition, such as naa.<naa_ID>:1. The specified partition becomes
the file system's head partition.
--blocksize | -b
Specifies the block size of the VMFS file system to create. When omitted, defaults to using 1MB.
--setfsname | -S
Name of the VMFS file system to create.
--spanfs | -Z <span_partition> <head_partition>
Extends the VMFS file system with the specified head partition by spanning it across the partition specified by
<span_partition>.
--rescanvmfs | -V
Rescans the host for new VMFS volumes.
--queryfs | -P <directory>
Lists attributes of a file or directory on a VMFS volume. Displays VMFS version number, the VMFS file system
partitions, the capacity and the available space.
VIRTUAL DISK OPTIONS

--createvirtualdisk | -c <size> -a | --adaptertype <srcfile> -d | --diskformat <location>


Creates a virtual disk at the specified location on a VMFS volume. With <size> you can specify specify k|K, m|M,
or g|G. Default size is 1MB, default adapter type is 'busLogic', and default disk format is 'zeroedthick'.
--adapterType | -a [buslogic|lsilogic|ide]
Adapter type of a disk to be created. Accepts buslogic, lsilogic or ide.
--diskformat | -d
Specifies the target disk format when used with -c, -i, or -X.
For c, accepts zeroedthick, eagerzeroedthick, or thin.
For i, accepts zeroedthick, eagerzeroedthick, thin, rdm:dev, rdmp:dev, or 2gbsparse.
For -X, accepts eagerzeroedthick.
--clonevirtualdisk | -i <src_file> <dest_file> --diskformat | -d <format> --adaptertype | -a <type>
Creates a copy of a virtual disk or raw disk. The copy will be in the specified disk format. Takes source disk and
destination disk as arguments.
--deletevirtualdisk | -U <disk>
Deletes files associated with the specified virtual disk.
--renamevirtualdisk | -E <old_name> <new_name>
Renames a specified virtual disk.
--extendvirtualdisk | -X [-d eagerzeroedthick]
Extends the specified VMFS virtual disk to the specified length. This command is useful for extending the size of
a virtual disk allocated to a virtual machine after the virtual machine has been created. However, this command
requires that the guest operating system has some capability for recognizing the new size of the virtual disk and
taking advantage of this new size (e.g. by updating the file system on the virtual disk to take advantage of the
extra space).
On ESX/ESXi 4.0 and later, you can use -d | --diskformat to specify that the disk should grow in
eagerzeroedthick format. You can use -d only with eagerzeroedthick. By default, any disk, regardless of format,
is extended as zeroedthick. Extending disks to eagerzeroedthick makes sense only when these virtual disks are
used for fault tolerance or clustering and have to be preallocated and zeroed out up front.
--createrdm | -r <rdm_file>
Creates a raw disk mapping, that is, maps a raw disk to a file on a VMFS file system. Once the mapping is
established, the mapping file can be used to access the raw disk like a normal VMFS virtual disk. The 'file length'
of the mapping is the same as the size of the raw disk that it points to.
--createrdmpassthru | -z <device> <map_file>
Creates a passthrough raw disk mapping. Once the mapping is established, it can be used to access the raw disk
like a normal VMFS virtual disk. The 'file length' of the mapping is the same as the size of the raw disk that it
points to.
--querydm | -q
This option is not currently supported.
--geometry | -g
Returns the geometry information (cylinders, heads, sectors) of a virtual disk.
--writezeros | -w
Initializes the virtual disk with zeros. Any existing data on the virtual disk is lost.
--inflatedisk | -j
Converts a 'thin' virtual disk to 'eagerzeroedthick'. Any data on the 'thin' disk is preserved. Any blocks that were
not allocated are allocated and zeroed out.

EXAMPLES

The following examples assume you are specifying connection options, either explicitly or, for example, by specifying
the server, user name, and password. Run vmkfstools --help for a list of common options including connection
options. The examples use single quotes around some names; use double quotes on Windows.
Create the specified file system:
For ESX/ESXi version earlier than 4.0, specify the VMHBA name:
vmkfstools <conn_options> -C vmfs3 -b 1m -S Test vmhba0:0:0:3

For ESX/ESXi version 4.0 or later, specify the device name, for example naa.xxx:
vmkfstools <conn_options> -C vmfs3 -b 1m -S Test naa.600601604d521c002732ff0dc122dd11:3
Create a virtual disk:
vmkfstools <conn_options> -c 2048m '[storage1] rh6.2.vmdk'

Rename files associated with a specified virtual disk to the specified name:
vmkfstools <conn_options> -E '[storage1] rh6.2.vmdk' '[storage1] testing2.vmdk'

Get the geometry information (cylinders, heads, and sectors) of a virtual disk:
vmkfstools <conn_options> -g '[storage1] testing2.vmdk'

Delete an existing virtual disk:


vmkfstools <conn_options> -U '[storage1] testing2.vmdk'

Shrink the size of the virtual disk:


vmkfstools <conn_options> -s '[storage1] rh6.2.vmdk'

Extend the virtual disk to specified size, the extended region of the disk grows in eagerzeroedthick format:
vmkfstools <conn_options> -X 1g -d eagerzeroedthick '[storage1] rh6.2.vmdk'

Initialize the virtual disk with zeros:


vmkfstools <conn_options> -w '[storage1] rh6.2.vmdk'

vmware-cmd - perform virtual machine operations

SYNOPSIS

General Options
vmware-cmd [--help | -q | -v]

Server Operations
vmware-cmd -s <conn_option>
[-l |
-s register <config_file_path> [<datacenter>] [<resource_pool>] |
-s unregister <config_file_path> ]

Virtual Machine Operations


vmware-cmd <conn_option> <config_file_path>
[answer |
connectdevice <device_name> |
createsnapshot <name> <description> quiesce [0|1] memory [0|1] |
disconnectdevice <device_name> |
getconfigfile |
getguestinfo <variable> |
getproductinfo [product|platform|build|majorversion|minorversion] |
getstate |
gettoolslastactive |
getuptime |
hassnapshot |
reset [soft|hard] |
removesnapshots
revertsnapshot |
setguestinfo <variable> <value> |
start |
suspend [soft|hard] ]

DESCRIPTION

vmware-cmd provides an interface to perform operations on a virtual machine. You can retrieve information such as the
power state, register and unregister the virtual machine, set configuration variables, and manage snapshots.

OPTIONS
CONNECTION OPTIONS

The vmware_cmd vSphere CLI command connection options differ from those of most other vSphere CLI commands.
-H <host>
Specifies an ESX/ESXi host or a vCenter Server system.
-h | --vihost <esx_host>
Specifies a target host if the host specified by -H <host> is a vCenter Server system.
-O <port>
Specifies an alternative port. Default is 443
-U <user_name>
Name of the user who connects to the target. This user must have privileges to perform the operation.
-P <password>
Password of the user specified by <username>. Required if a user is specified.
--config <connection_config_file>
Location of a configuration file that specifies connection information.
--credstore <cred_store>
Name of a credential store file.
--sessionfile <session_file>
Name of a session file that was saved earlier using the vSphere SDK for Perl session/save_session.pl script.
--passthroughauth <passthroughauth>
If you specify this option, the system attempts to connect using Microsoft Windows Security Support Provider
Interface (SSPI).
GENERAL OPTIONS

--help
Prints a help message for each command-specific and each connection option. Calling the script with no
arguments or with --help has the same effect.
-q
Turns on quiet mode with minimal output.
-v
Turns on verbose mode.

OPERATIONS

The following operations require that you specify the path to the virtual machine configuration file. Choose one of the
following formats:
Datastore prefix style: [ds_name] <relative_path>
For example:
'[myStorage1] testvms/VM1/VM1.vmx' (Linux)
"[myStorage1] testvms\VM1\VM1.vmx" (Windows)

UUID-based path: folder/subfolder/file


For example:
'/vmfs/volumes/mystorage/testvms/VM1/VM1.vmx' (Linux)
"/vmfs/volumes/mystorage/testvms/VM1/VM1.vmx" (Windows)
SERVER OPERATIONS

-l
Lists all registered virtual machines.
-s register <config_file_path[<datacenter>] [<resource_pool>]
Registers a virtual machine.
If -H specifies a vCenter Server system, you must specify the datacenter and the resource pool to register the
virtual machine in. The default datacenter is ha-datacenter and the default resource pool is Resources.
If -H specifies an ESX/ESXi system, you usually do not specify the resource pool and datacenter. However, if two
virtual machines with the same name exist in two resource pools, you must specify the resource pool.
-s unregister
Unregisters a virtual machine.
VIRTUAL MACHINE OPERATIONS

<config_file_path> answer
Prompts the user to answer a question for a virtual machine waiting for user input.
connectdevice <config_file_path> <device_name>
Connects a virtual device to a virtual machine.
<config_file_path> createsnapshot <name> <description> quiesce 0|1 memory 0|1
Creates a snapshot of the specified virtual machine, providing a name and description for the snapshot.
If the <quiesce> flag is 1 and the virtual machine is powered on when the snapshot is taken, VMware Tools is
used to quiesce the file system in the virtual machine. Quiescing a file system is a process of bringing the on-disk
data of a physical or virtual computer into a state suitable for backups. This process might include such
operations as flushing dirty buffers from the operating system's in-memory cache to disk, or other higher-level
application-specific tasks.
If the <memory> flag is 1, a dump of the internal state of the virtual machine is included in the snapshot.
Memory snapshots take longer to create.
<config_file_path> disconnectdevice
Disconnects the specified virtual device from the virtual machine.
<config_file_path> getconfigfile
Returns a string containing the name of the virtual machine configuration file. This command fails if the virtual
machine is not connected.
<config_file_path> getguestinfo
Retrieves the value for a GuestInfo variable. The variable contains the attributes of the guest operating system
of a virtual machine. For example, you can run the following command to retrieve the IP address of a virtual
machine: vmware-cmd <config_file-path> getguestinfo ip You usually use this command when VMware
Technical Support or a VMware Knowledge Base article instruct you to do so.
<config_file_path> getproductinfo
Returns information about the product, where <prodinfo> is product, platform, build, majorversion (product
major version number), or minorversion (product minor version number). If product is specified, the return
value is one of the following:
esx -- VMware ESX
embeddedESX -- VMware ESXi
unknown (unknown product type)

If platform is specified, the return value is one of the following:


win32-x86 -- x86-based Windows system
linux-x86 -- x86-based Linux system
vmnix-x86 -- x86 ESX/ESXi microkernel

<config_file_path> getstate
Retrieves the execution state of a virtual machine. The state can be on, off, suspended, or unknown.
<config_file_path> gettoolslastactive
Returns an integer indicating how much time has passed, in seconds, since the last heartbeat was detected from
the VMware Tools service. This value is initialized to zero when the virtual machine powers on. It stays at zero
until the first heartbeat is detected. After the first heartbeat, the value is always greater than zero until the
virtual machine is power cycled again. The command can return one of the following:
• 0 -- VMware Tools are not installed or not running.
• 1 -- Guest operating system is responding normally.
• 5 -- Intermittent heartbeat. There might be a problem with the guest operating system.
• 100 -- No heartbeat. Guest operating system might have stopped responding
<config_file_path> getuptime
Returns the uptime (in seconds) of the guest operating system on the virtual machine.
<config_file_path> hassnapshot
Returns 1 if the virtual machine already has a snapshot. Returns 0 otherwise.
<config_file_path> removesnapshots
Removes all snapshots belonging to the virtual machine. If no snapshot exists, does nothing.
<config_file_path> reset [soft|hard]
Shuts down, and then reboots a virtual machine. The powerop_mode can be hard or soft. Default is soft.
<config_file_path> revertsnapshot
Reverts the virtual machine to the current snapshot. If no snapshot exists, does nothing and leaves the virtual
machine state unchanged.
<config_file_path> setguestinfo<variable> <value>
Writes a GuestInfo variable into memory. This is an advanced command. You usually use this command when
VMware Technical Support or a VMware Knowledge Base article instruct you to do so.
<config_file_path> start
Powers on a previously powered-off virtual machine or resumes a suspended virtual machine.
<config_file_path> stop
Shuts down and powers off a virtual machine. The powerop_mode can be hard or soft. Default is soft.
<config_file_path> suspend [soft|hard]
Suspends a virtual machine. The default powerop_mode is soft.

EXAMPLES

The following examples assume you are specifying connection options, either explicitly or, for example, by specifying
the server, user name, and password. Run vmware-cmd --help for a list of common options including connection
options.
SERVER OPERATIONS

List all the registered virtual machines:


vmware-cmd <connection_options> -l

Register a virtual machine:


vmware-cmd <connection_options>
-s register /vmfs/volumes/storage1/MyVM/MyVM.vmx
Unregister a virtual machine:
vmware-cmd <connection_options>
-s unregister /vmfs/volumes/storage1/MyVM/MyVM.vmx

VIRTUAL MACHINE OPERATIONS

Get the execution state of a virtual machine:


vmware-cmd <connection_options>
/vmfs/volumes/storage1/MyVM/MyVM.vmx getstate

Power on a virtual machine with 'soft' power mode (requires VMware Tools):
vmware-cmd <connection_options>
/vmfs/volumes/storage1/MyVM/MyVM.vmx start soft

Power on a virtual machine with 'hard' power mode:


vmware-cmd <connection_options>
/vmfs/volumes/storage1/MyVM/MyVM.vmx start hard

Set a guest info variable for a virtual machine:


vmware-cmd <connection_options>
/vmfs/volumes/storage1/MyVM/MyVM.vmx setguestinfo VarABC 102

Retrieve the value for a guest info variable for a virtual machine:
vmware-cmd <connection_options>
/vmfs/volumes/storage1/MyVM/MyVM.vmx getguestinfo VarABC

Get the platform information:


vmware-cmd <connection_options>
/vmfs/volumes/storage1/MyVM/MyVM.vmx getproductinfo platform

Get the build information:


vmware-cmd <connection_options>
/vmfs/volumes/storage1/MyVM/MyVM.vmx getproductinfo build

Connect a virtual CD/DVD drive to a virtual machine:


vmware-cmd <connection_options>
/vmfs/volumes/storage1/MyVM/MyVM.vmx connectdevice "CD/DVD Drive 2"

Disconnect a virtual CD/DVD drive from a virtual machine:


vmware-cmd <connection_options>
/vmfs/volumes/storage1/MyVM/MyVM.vmx disconnectdevice "CD/DVD Drive 2"

Retrieve the path to the configuration file for a virtual machine:


vmware-cmd <connection_options>
/vmfs/volumes/storage1/MyVM/MyVM.vmx getconfigfile

Retrieve the uptime of a virtual machine's guest OS:


vmware-cmd <connection_options>
/vmfs/volumes/storage1/MyVM/MyVM.vmx getuptime

Answer a question for a virtual machine requesting input:


vmware-cmd <connection_options>
/vmfs/volumes/storage1/MyVM/MyVM.vmx answer

Retrieve the VMware tools status:


vmware-cmd -U <connection_options>
/vmfs/volumes/storage1/MyVM/MyVM.vmx gettoolslastactive

DATACENTER OPERATIONS
You can perform any of the datacenter operations on a vCenter Server system by specifying the vCenterServer system
using the -H option and the ESX/ESXi host using the --vihost | -h option. To register a virtual machine on a vCenter
Server system, you have to specify the datacenter and resource pool name. For example:
Register a virtual machine.
vmware-cmd -U <myuser> -P <mypassword> -H VCServerABC --vihost ESXHost
-s register /vmfs/volumes/storage1/MyVM/MyVM.vmx DatacenterA PoolC

Get the execution state of a virtual machine.


vmware-cmd -U <myuser> -P <mypassword> -H VCServerABC -h ESXHost
/vmfs/volumes/storage1/MyVM/MyVM.vmx getstate

Get the product information.


vmware-cmd -U <myuser> -P <mypassword> -H VCServerABC --vihost ESXHost
/vmfs/volumes/storage1/MyVM/MyVM.vmx getproductinfo product

Determine if the virtual machine has snapshot.


vmware-cmd -U <myuser> -P <mypassword> -H VCServerABC -h ESXHost
/vmfs/volumes/storage1/MyVM/MyVM.vmx hassnapshot

Create a snapshot.
vmware-cmd -U <myuser> -P <mypassword> -H VCServerABC -h ESXHost
/vmfs/volumes/storage1/MyVM/MyVM.vmx createsnapshot <name> <description>
<quiesce> <memory>

Revert the virtual machine to the last snapshot.


vmware-cmd -U <myuser> -P <mypassword> -H VCServerABC -h ESXHost
/vmfs/volumes/storage1/MyVM/MyVM.vmx revertsnapshot

Remove all the snapshots of virtual machine


vmware-cmd -U <myuser> -P <mypassword> -H VCServerABC -h ESXHost
/vmfs/volumes/storage1/MyVM/MyVM.vmx removesnapshots

You might also like