esxcli storage Commands

Command Description Options Help
storage core adapter list List all the SCSI Host Bus Adapters on the system.
--help | -h
Show the help message.
storage core adapter rescan Rescan SCSI HBAs to search for new Devices, remove DEAD paths and update path state. This operation will also run an claim operation equivalent to the claimrule run command and a filesystem rescan.
--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 them be claimed by the appropriate Multipath Plugin. Passing this flag will skip that claiming session.
--skip-fs-scan | -F
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.
storage core adapter stats get List the SCSI stats for the SCSI Host Bus Adapters in the system.
--adapter | -a
Limit the stats output to one adapter
--help | -h
Show the help message.
storage core claiming autoclaim Control the automatic PSA (path/device) claiming code allowing the disabling of the automatic claiming process or re-enabling of the claiming process if it was previously disabled. By default the automatic PSA claiming process is on and should not be disabled by users unless specifically instructed to do so.
--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. Default is to have this process enabled. This should not be changed by users unless specifically instructed to do so.
--help | -h
Show the help message.
--wait | -w
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.
storage core claiming reclaim Attempt to unclaim all paths to a device and then run the loaded claimrules on each of the paths unclaimed to attempt to reclaim them.
--device | -d
Reclaim requires the name of a device on which all paths will be unclaimed and then reclaimed.
--help | -h
Show the help message.
storage core claiming unclaim 1) Unclaim a path or set of paths, disassociating them from a PSA plugin. NOTES: It is normal for path claiming to fail especially when unclaiming by plugin or adapter. Only inactive paths with no I/O will be able to be unclaimed. Typically the ESXi USB partition and devices with VMFS volumes on them will not be unclaimable. Also NOTE unclaiming will not persist and periodic path claiming will reclaim these paths in the near future unless claim rules are configured to mask the path. 2) Detach a (set of) filter(s) from one or more devices.
--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 value indicates the value of the SCSI channel number for the paths you wish to unclaim. This parameter can be omitted to indicate unclaiming should be run on paths with any channel number.
--claimrule-class | -c
Indicate the claim rule class to use in this operation [MP, Filter].
--device | -d
If the --type parameter is 'device' attempt to unclaim all paths to a specific device (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.
--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.
storage core claimrule add Add a claimrule to the set of claimrules on the system.
--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 this operation.
--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.
storage core claimrule convert Convert ESX 3.x style /adv/Disk/MaskLUNs LUN masks to Claim Rule format. WARNING: This conversion will not work for all input MaskLUNs variations! Please inspect the list of generated claim rules carefuly, then if the suggested LUN mask claim rules are correct use the --commit parameter to write the list to the config file.
--commit | -C
Force LUN mask config changes to be saved. If this parameter is omitted, config file changes will not be saved.
--help | -h
Show the help message.
storage core claimrule list List all the claimrules on the system.
--claimrule-class | -c
Indicate the claim rule class to use in this operation [MP, Filter, VAAI, all].
--help | -h
Show the help message.
storage core claimrule load Load path claiming rules from config file into the VMkernel.
--claimrule-class | -c
Indicate the claim rule class to use in this operation [MP, Filter, VAAI, all].
--help | -h
Show the help message.
storage core claimrule move Move a claimrule from one rule id to another
--claimrule-class | -c
Indicate the claim rule class to use in this operation [MP, Filter, VAAI].
--help | -h
Show the help message.
--new-rule | -n
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.
storage core claimrule remove Delete a claimrule to the set of claimrules on the system.
--claimrule-class | -c
Indicate the claim rule class to use in this operation [MP, Filter, VAAI].
--help | -h
Show the help message.
--plugin | -P
Indicate the plugin to use for this operation.
--rule | -r
Indicate the rule ID to use for this operation.
storage core claimrule run Execute path claiming rules.
--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 operation [MP, Filter].
--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.
storage core device detached list Lists all devices that were detached manually by changing their state on the system.
--device | -d
Filter the output of the command to limit the output to a specific device.
--help | -h
Show the help message.
storage core device detached remove Provide control to allow a user to remove Detached devices from the persistent detached device list.
--device | -d
Select the detached device to remove from the Detached Device List.
--help | -h
Show the help message.
storage core device list For devices currently registered with the PSA, list the filters attached to them.
--device | -d
Filter the output of this command to only show a single device.
--help | -h
Show the help message.
storage core device partition list For a given device list all of the partitions
--device | -d
Filter the output to a specific device.
--help | -h
Show the help message.
storage core device set Provide control to allow a user to modify a SCSI device's state.
--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
The new name to assign the given device.
--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.
storage core device setconfig Set device configuration
--detached
Mark device as detached.
--device | -d
Apply the command to a single device.
--help | -h
Show the help message.
--perennially-reserved
Mark device as perennially reserved.
storage core device stats get List the SCSI stats for SCSI Devices in the system.
--device | -d
Limit the stats output to one specific device. This device name can be any of the UIDs the device reports
--help | -h
Show the help message.
storage core device vaai status get List VAAI properties for devices currently registered with the PSA.
--device | -d
Filter the output of this command to only show a single device.
--help | -h
Show the help message.
storage core device world list Get a list of the worlds that are currently using devices on the ESX host.
--device | -d
Filter the output of the command to limit the output to a specific device. This device name can be any of the UIDs registered for a device.
--help | -h
Show the help message.
storage core path list List all the SCSI paths on the system.
--device | -d
Limit the output to paths to a specific device. This name can be any of the UIDs for a specific device.
--help | -h
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.
storage core path set Provide control to allow a user to modify a single path's state. This efffectively allows a user to enable or disable SCSI paths. The user is not able to change the full range of path states, but can toggle between 'active' and 'off'. Please NOTE changing the Path state on any path that is the only path to a given device is likely to fail. The VMkernel will not change the path's state if changing the state would cause an 'All paths down' state or the device is currently in use.
--help | -h
Show the help message.
--path | -p
Select the path to set path state on. This can be a Runtime Name or Path UID
--state
Set the SCSI path state for a the specific path given. Valid values are : active: Set the path's state to active. This may be immediately changed by the system to another state if the active state is not appropriate. off: Administratively disable this path.
storage core path stats get List the SCSI stats for the SCSI Paths in the system.
--help | -h
Show the help message.
--path | -p
Limit the stats output to one specific path. This path name can be the runtime name or the path UID.
storage core plugin list List loaded PSA plugins on the system.
--help | -h
Show the help message.
--plugin-class | -N
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)
storage core plugin registration add Register a plugin module with PSA.
--dependencies | -d
Add the [optional] dependencies for this module to loaded
--full-path | -I
Add the [optional] full path to this module
--help | -h
Show the help message.
--module-name | -m
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
storage core plugin registration list List modules currently registered with PSA.
--help | -h
Show the help message.
--module-name | -m
Filter the output of this command to only show a single module.
--plugin-class | -N
Indicate the class of plugin to list. Allowed values are MP, VAAI or MPP defined subplugins like PSP, SATP.
storage core plugin registration remove UnRegister a plugin module with PSA.
--help | -h
Show the help message.
--module-name | -m
Select the module name to be unregistered
storage filesystem automount Request mounting of known datastores not explicitly unmounted.
--help | -h
Show the help message.
storage filesystem list List the volumes available to the host. This includes VMFS, NAS and VFAT partitions.
--help | -h
Show the help message.
storage filesystem mount Connect to and mount an unmounted volume on the ESX host.
--help | -h
Show the help message.
--no-persist | -n
Mount the volume non-peristently; the volume will not be mounted after a restart.
--volume-label | -l
The label of the volume to mount. This 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 filesystem rescan Issue a rescan operation to the VMkernel to have is scan storage devices for new mountable filesystems.
--help | -h
Show the help message.
storage filesystem unmount Disconnect and unmount and existing VMFS or NAS volume. This will not delete the configuration for the volume, but will remove the volume from the list of mounted volumes.
--help | -h
Show the help message.
--no-persist | -n
Unmount the volume non-peristently; the volume will be automounted after a restart.
--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.
storage nfs add Add a new NAS volume to the ESX Host and mount it with the given volume name.
--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 read-only.
--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 List the NAS volumes currently known to the ESX host.
--help | -h
Show the help message.
storage nfs remove Remove an existing NAS volume from the ESX host.
--help | -h
Show the help message.
--volume-name | -v
The volume name of the NAS volume to remove from the ESX host.
storage nmp device list List the devices currently controlled by the VMware NMP Multipath Plugin and show the SATP and PSP information associated with that device.
--device | -d
Filter the output of this command to only show a single device.
--help | -h
Show the help message.
storage nmp device set Allow setting of the Path Selection Policy (PSP) for the given device to one of the loaded policies on the system.
--default | -E
The Path selection policy is set back to the default for the assigned SATP for this device.
--device | -d
The device you wish to set the Path Selection Policy for.
--help | -h
Show the help message.
--psp | -P
The Path selection policy you wish to assign to the given device.
storage nmp path list List the paths currently claimed by the VMware NMP Multipath Plugin and show the SATP and PSP information associated with that path.
--device | -d
Filter the output of this command to only show paths to a single device.
--help | -h
Show the help message.
--path | -p
Filter the output of this command to only show a single path.
storage nmp psp fixed deviceconfig get Allow retrieving of Fixed Path Selection Policy settings for a given device.
--device | -d
The device you wish to get the Preferred path for.
--help | -h
Show the help message.
storage nmp psp fixed deviceconfig set Allow setting of the perferred path on a given device controlled by the Fixed Path Selection Policy.
--default | -E
Clear the preferred path selection for the given device.
--device | -d
The device you wish to set the preferred path for. This device must be controlled by the Fixed Path Selection Policy
--help | -h
Show the help message.
--path | -p
The path you wish to set as the preferred path for the given device.
storage nmp psp generic deviceconfig get Allow retrieving of per device PSP configuration parameters.
--device | -d
The device you wish to get PSP configuration for.
--help | -h
Show the help message.
storage nmp psp generic deviceconfig set Allow setting of per device PSP configuration parameters. This command will set the configuration for the given device with whichever PSP it is currently configurated with.
--config | -c
The configuration string you wish to set.
--device | -d
The device you wish to set PSP configuration for.
--help | -h
Show the help message.
storage nmp psp generic pathconfig get Allow retrieving of per path PSP configuration parameters.
--help | -h
Show the help message.
--path | -p
The path you wish to get PSP configuration for.
storage nmp psp generic pathconfig set Allow setting of per path PSP configuration parameters. This command will set the configuration for the given path with whichever PSP it is currently configurated with.
--config | -c
The configuration string you wish to set.
--help | -h
Show the help message.
--path | -p
The path you wish to set PSP configuration for.
storage nmp psp list List the Path Selection Plugins (PSP) that are currently loaded into the NMP system and display information about those PSPs
--help | -h
Show the help message.
storage nmp psp roundrobin deviceconfig get Allow retrieving of Round Robin Path Selection Policy settings for a given device.
--device | -d
The device you wish to get the Round Robin properties for.
--help | -h
Show the help message.
storage nmp psp roundrobin deviceconfig set Allow setting of the Round Robin path options on a given device controlled by the Round Robin Selection Policy.
--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
The device you wish to set the Round Robin settings for. This device must be controlled by the Round Roubin Path 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
storage nmp satp generic deviceconfig get Allow retrieving of per device SATP configuration parameters.
--device | -d
The device you wish to get SATP configuration for.
--help | -h
Show the help message.
storage nmp satp generic deviceconfig set Allow setting of per device SATP configuration parameters. This command will set the configuration for the given device with whichever SATP it is currently configurated with.
--config | -c
The configuration string you wish to set.
--device | -d
The device you wish to set SATP configuration for.
--help | -h
Show the help message.
storage nmp satp generic pathconfig get Allow retrieving of per path SATP configuration parameters.
--help | -h
Show the help message.
--path | -p
The path you wish to get SATP configuration for.
storage nmp satp generic pathconfig set Allow setting of per path SATP configuration parameters. This command will set the configuration for the given path with whichever SATP it is currently configurated with.
--config | -c
The configuration string you wish to set.
--help | -h
Show the help message.
--path | -p
The path you wish to set SATP configuration for.
storage nmp satp list List the Storage Array Type Plugins (SATP) that are currently loaded into the NMP system and display information about those SATPs
--help | -h
Show the help message.
storage nmp satp rule add Add a rule to the list of claim rules for the given 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
Set the claim option string when adding a SATP claim rule.
--description | -e
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.
storage nmp satp rule list List the claiming rules for Storage Array Type Plugins (SATP)
--help | -h
Show the help message.
--satp | -s
Filter the SATP rules to a specific SATP
storage nmp satp rule remove Delete a rule from the list of claim rules for the given 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
--driver | -D
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
storage nmp satp set Set the default Path Selection Policy for a given Storage Array Type Plugin (SATP).
--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
The default path selection policy to set for a 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 extent list List the VMFS extents available on the host.
--help | -h
Show the help message.
storage vmfs snapshot extent list List extents of unresolved snapshots/replicas of VMFS volume.
--help | -h
Show the help message.
--volume-label | -l
The VMFS volume label of the target snapshot to enumerate.
--volume-uuid | -u
The VMFS volume uuid of the target snapshot to enumerate.
storage vmfs snapshot list List unresolved snapshots/replicas of VMFS volume.
--help | -h
Show the help message.
--volume-label | -l
The VMFS volume label of the snapshot to list.
--volume-uuid | -u
The VMFS volume uuid of the snapshot to list.
storage vmfs snapshot mount Mount a snapshot/replica of a VMFS volume.
--help | -h
Show the help message.
--no-persist | -n
Mount the volume non-peristently; the volume will not be automounted after a restart.
--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 snapshot resignature Resignature a snapshot/replica of a VMFS volume.
--help | -h
Show the help message.
--volume-label | -l
The VMFS volume label of the snapshot to resignature.
--volume-uuid | -u
The VMFS volume uuid of the snapshot to resignature.
storage vmfs upgrade Upgrade a VMFS3 volume to VMFS5.
--help | -h
Show the help message.
--volume-label | -l
The label of the volume to upgrade.
--volume-uuid | -u
The uuid of the volume to upgrade.