Replacements for Service Console Commands lists common ESX/ESXi 4.x service console commands and corresponding ESXi 5.0 and later shell commands.
Important This document does not present a complete list of ESXCLI commands. The focus is on replacing existing service console commands. See the vSphere Command-Line Interface Reference for a complete list of commands.
In ESX 4.x, protects the service console. In ESXi 5.x, esxcfg-firewall is not necessary because no service console exists.The esxcli network firewall command is available for ESXi firewall management. esxcli storage core path commands. esxcli storage core commands. esxcli network ip route commands esxcli network ip interface covers most options and includes a number of options not available in the esxcfg-vmknic command. esxcli network vswitch standard for standard switches.esxcli network vswitch dvs for distributed switches. Supported in the ESXi 5.0 and later ESXi Shell. If you do not have access to the ESXi Shell, use the resxtop remote vCLI command from a supported Linux system or from vMA. esxcli software vib The vmkfstools command is available in the ESXi 5.0 and later ESXi Shell. The vmkfstools vCLI command options differ slightly from the shell command options. Use vm-support --help for more information.
Table 5. esxcli 4.x corestorage namespace Several new options for this command are available. See the vSphere Command-Line Interface Reference, or run the command with --help. The following table lists equivalent commands for esxcli storage nmp commands.
Table 6. esxcli nmp namespace The esxcli network commands included in ESXCLI 4.1 have been renamed. Many additional networking commands are available in ESXCLI 5.0 and later.
The esxcli swiscsi namespace supports a few management commands for software iSCSI in ESXi 4.1. The commands have been renamed. ESXCLI equivalents have also been added for the esxcfg-swiscsi and esxcfg-hwiscsi commands.
Use the iscsi session connection namespace to perform operations on the iSCSI connection.The ESXi 4.1 esxcli vms namespace allows you to list virtual machines and forcibly stop them. The namespace has been renamed.
Forcibly kill virtual machines that are not responding to normal stop operations. Requires the type of kill operation (soft, hard, force) and the world ID of the virtual machine to kill. Instead of esxcfg-advcfg, use esxcli system settings advanced. The following commands are supported.
Get the value of the VMkernel advanced configuration option. Us --option to retrieve information for a single option, or --tree to limit the list to a specific subtree. Set the welcome message for the direct console. You can retrieve the message with system welcomemsg get. Use esxcli system settings advanced list to list all options instead.
■ Use esxcli coredump partition commands to configure a local dump partition.
■ Install ESXi Dump Collector to support sending core dumps to a remote host and run esxcli coredump network commands to configure the remote dump partition.
The following table lists the esxcfg-dumppart command options and corresponding ESXCLI commands.
Table 10. esxcfg-dumppart Replacement Commands Important: Execution might take several minutes and slow down your ESXi host because the command scans all LUNs on the system. CAUTION: If you run this command, your system cannot write errors to a file until another partition is activated. You lose any error record if errors occur. No corresponding ESXCLI command. No corresponding ESXCLI command. No comprehensive set of equivalent ESXCLI commands corresponding to esxcfg-info is available yet. The following commands are offering some of the esxcfg-info capability.
In vSphere 5.1 and later, you can use commands in the esxcli network ip ipsec namespace in place of the esxcfg-ipsec command.
The esxcfg-swiscsi command manages software iSCSI. Equivalent ESXCLI commands are available in vSphere 5.0 and later.
Table 13. esxcfg-swiscsi Replacement Commands The esxcfg-hwiscsi command managed hardware iSCSI.
Table 14. esxcfg-hwiscsi Replacement Commands The esxcfg-route command has equivalent ESXCLI commands. The new command set has enhanced functionality.
Table 15. esxcfg-rout Replacement Commands The esxcfg-scsidevs command has equivalent ESXCLI commands for some of the options.
Table 16. esxcfg-scsidevs Replacement Commands List all the storage devices known to the system, including both SCSI and non-SCSI devices. The list can be filtered using the --device option to limit the output to specific device. List all the device unique identifiers. Include the mapping from primary identifier to all secondary identifiers. The list can be filtered using the --device option to limit the output to specific device. ESXCLI does not have equivalent options for the --device, --vfat, and --hba-device-list filtering options.The -o|--offline-cos-dev and -n|--online-cos-dev options are service console specific options and not applicable to ESXi 5.0 and later.The esxcfg-module command supports manipulation of the VMkernel loadable modules and device drivers.For the following esxcfg-module options, ESXCLI commands are available.
The esxcfg-mpath command supports listing information about Fibre Channel or iSCSI LUNs and changing a path’s state. In vSphere 5.0 and later, equivalent ESXCLI commands are available.
Set the state of a given LUN path to either active or off. This option requires that the --path option is set and specifies either the path UID or the path runtime name.The esxcfg-nas command manipulates NAS file systems associated with ESXi systems. In vSphere 5.0 and later, equivalent ESXCLI commands are available.
- -add <name> - -delete <name> - -list - -host <n_host> - -readonly - -share <share> The esxcfg-nics command manages physical NICs (uplink adapters) used by an ESXi host. In vSphere 5.0 and later, equivalent ESXCLI commands are available.
Set 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). List information about all the network adapters. Use network nic get <adapter> to list information about one specific adapter, for example esxcli network nic get -n vmnic0 Set the speed at which a given network adapter should run. Valid values for speed are 10, 100, 1000, or 10000.The esxcfg-rescan command rescans the storage configuration. In vSphere 5.0 and later, equivalent ESXCLI commands are available.
Table 21. esxcfg-rescan Replacement Commands In addition, ESXCLI supports several other rescan commands. Run esxcli storage core adapter rescan --help.The esxcfg-vmknic command adds, deletes, and modifies VMkernel network interfaces. In vSphere 5.0 and later, equivalent ESXCLI commands are available.
If you set a static IPv4 address, you must specify the --netmask option in same command. MTU for the interface being created. Used at the top-level ip namespace, not inside the ipv4 or ipv6 namespace. IP netmask(X.X.X.X) to be used for the VMkernel NIC. Setting an IP netmask requires that the --interface option be given in same command. The esxcfg-volume command manages LVM snapshot or replica volumes. In vSphere 5.0 and later, equivalent ESXCLI commands are available in the esxcli storage filesystem and in the esxcli storage vmfs namespaces.
--mount -m --persistent -M Mount a snapshot or replica of a VMFS volume. Use the --nopersist option to mount the volume non-persistently. The esxcfg-vswitch command manages virtual switches. In vSphere 5.0 and later, equivalent ESXCLI commands are available.
Check whether a virtual switch exists. Print 1 if the switch exists and print 0 otherwise. Use the virtual switch name, e.g. vSwitch0 or vSwitch1, to specify the virtual switch. network vswitch standard list includes CDP information. Provide 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 the CDP status for a given virtual switch (valid for vSphere 4.0 and later). To set, specify down, listen, advertise, or both. At any time, there is one port group NIC array, and a corresponding set of active uplinks. For example, assume the portgroup nic array is [vmnic1, vmnic0, vmnic3, vmnic5, vmnic6, vmnic7] and active-uplinks is set to three uplinks (vmnic1, vmnic0, vmnic3), and the rest are standby uplinks. If you set the active uplinks with new set [vmnic3, vmnic5], those uplinks override the old set. The NIC array changes to [vmnic3, vmnic5, vmnic6, vmnic7] and max-active becomes 2.The esxtop command is available and supported in the ESXi Shell. Search the vSphere Documentation Center, or see the vSphere Resource Management documentation.The esxupdate command allows you to manage ESX 4.0 and later systems. Use the commands in the esxcli software namespace to install, update, remove, or display individual VIBs (software packages). Use commands in the esxcli software sources namespace to query depot contents for VIBs and image profiles. An image profile defines an ESXi image and consists of VIBs.
Table 25. esxupdate Replacement Commands The update command updates VIB packages but does not install new VIBs.The install command installs VIB packages from a URL or depot. The command installs, upgrades, or downgrades VIBs. Run esxcli software sources profile to query for image profiles in a depot.Run esxcli software sources vib to display information about VIB URLs and files. In vSphere 5.0, you can use the vicfg-snmp command to manage the ESXi SNMP agent. In vSphere 5.1 and later, the esxcli system snmp namespace has corresponding commands.vmkfstools is supported in the ESXi Shell and as a vCLI command. Some differences exist between the ESXi Shell vmkfstools command and the vmkfstools.pl vCLI command.The vmware-cmd command is included in the vCLI package, but is not available in the ESXi Shell.The vm-support command is available in the ESXi Shell. The command is not included in the vCLI package.
Important The vSphere Client now supports all options to vm-support. If you cannot use the vSphere Client to access your ESXi system, you can use the vm-support command.