6.0

Table Of Contents
Getting Started with vSphere Command-Line Interfaces
32 VMware, Inc.
Ineachiteration,thecommandissuesunmapcommandstothenumberoffilesystemblocksthatarespecified
bytheoptionalreclaim-unitargument,whichdefaultsto200.FornewlycreatedVMFS5filesystems,the
filesystemblocksizeisalways1MB.ForVMFS3filesystemsorVMFS5filesystemsthat
wereupgradedfrom
VMFS3,thefilesystemblocksizecouldbeoneof1,2,4,8MB.
Thefollowingexamplesillustratehowtousethecommand.
# esxcli storage vmfs unmap --volume-label datastore1 --reclaim-unit 100
# esxcli storage vmfs unmap -l datastore1 -n 100
# esxcli storage vmfs unmap --volume-uuid 515615fb-1e65c01d-b40f-001d096dbf97 --reclaim-unit 500
# esxcli storage vmfs unmap -u 515615fb-1e65c01d-b40f-001d096dbf97 -n 500
# esxcli storage vmfs unmap -l datastore1
# esxcli storage vmfs unmap -u 515615fb-1e65c01d-b40f-001d096dbf97
Using vifs to View and Manipulate Files on Remote ESXi Hosts
Youcanusethevifsutilityfordatastorefilemanagement.
Thevifscommandperformscommonoperationssuchascopy,remove,get,andputonESXifilesand
directories.ThecommandissupportedagainstESXihostsbutnotagainstvCenterServersystems.
SomesimilaritiesbetweenvifsandDOS orUNIX/Linuxfilesystem
managementutilitiesexist,butthereare
manydifferences.Forexample,vifsdoesnotsupportwildcardcharactersorcurrentdirectoriesand,asa
result,relativepathnames.Usevifsonlyasdocumented.
Insteadofusingthevifscommand,youcanbrowsedatastorecontentsandhostfilesbyusingaWebbrowser.
Connectto
thefollowinglocation:
http://ESX_host_IP_Address/host
http://ESX_host_IP_Address/folder
YoucanviewdatacenteranddatastoredirectoriesfromthisrootURL.Forexample:
http://<ESXi_addr>/folder?dcPath=ha-datacenter
http://<ESXi_host_name>/folder?dcPath=ha-datacenter
TheESXihostpromptsforausernameandpassword.
Thevifscommandsupportsdifferentoperationsforthefollowinggroupsoffilesanddirectories.Different
operationsareavailableforeachgroup,andyouspecifylocationswithadifferentsyntax.Thebehaviordiffers
forvSphere4.xandvSphere5.0.
CAUTIONIfyoumanipulatefilesdirectly,yourvSpheresetupmightendupinaninconsistentstate.Usethe
vSphereWebClientoroneoftheothervCLIcommandstomanipulatevirtualmachineconfigurationfilesand
virtualdisks.
vSphere 4.x vSphere 5.0
Host Hostconfigurationfiles.Youmustspecifythe
file’suniquenameidentifier.
Specifyhostlocationsbyusingthe
/host/<path>syntax.
Hostconfigurationfiles.Youmustspecifythe
file’suniquenameidentifier.
Specifyhostlocationsbyusingthe
/host/<path>syntax.
Youcannotlistsubdirectoriesof/host.