6.0

Table Of Contents
Getting Started with vSphere Command-Line Interfaces
22 VMware, Inc.
ShuttingdownamanagedhostdisconnectsitfromthevCenterServersystem,butdoesnotremovethehost
fromtheinventory.Youcanshutdownasinglehostorallhostsinadatacenterorcluster.Specifyoneofthe
optionslistedin“ConnectionOptionsforvCLIHostManagementCommands”
onpage 18inplaceof
<conn_options>.
Singlehost.Runvicfg-hostopswith--operationshutdown.
Ifthehostisinmaintenancemode,runthecommandwithoutthe--forceoption.
vicfg-hostops <conn_options> --operation shutdown
Ifthehostisnotinmaintenancemode,use--forcetoshutdownthehostandallrunningvirtual
machines.
vicfg-hostops <conn_options> --operation shutdown --force
Allhostsindatacenterorcluster.Toshutdownallhostsinaclusterordatacenter,specify--cluster
or--datacenter.
vicfg-hostops <conn_options> --operation shutdown --cluster <my_cluster>
vicfg-hostops <conn_options> --operation shutdown --datacenter <my_datacenter>
Youcanrebootasinglehostorallhostsinadatacenterorcluster.
Singlehost.Runvicfg-hostopswith--operationreboot.
Ifthehostisinmaintenancemode,runthecommandwithoutthe--forceoption.
vicfg-hostops <conn_options> --operation reboot
Ifthehostisnotinmaintenancemode,use--forcetoshutdownthehostandallrunningvirtual
machines.
vicfg-hostops <conn_options> --operation reboot --force
Allhostsindatacenterorcluster.Youcanspecify--clusteror--datacentertorebootallhostsina
clusterordatacenter.
vicfg-hostops <conn_options> --operation reboot --cluster <my_cluster>
vicfg-hostops <conn_options> --operation reboot --datacenter <my_datacenter>
Youcandisplayinformationaboutahostbyrunningvicfg-hostopswith--operationinfo.
vicfg-hostops <conn_options> --operation info
Thecommandreturnsthehostname,manufacturer,model,processortype,CPUcores,memorycapacity,and
boottime.ThecommandalsoreturnswhethervMotionisenabledandwhetherthehostisinmaintenance
mode.
Entering and Exiting Maintenance Mode
YoucaninstructyourhosttoenterorexitmaintenancemodewithESXCLIorwithvicfg-hostops.
Entering and Exiting Maintenance Mode with ESXCLI
Youplaceahostinmaintenancemodetoserviceit,forexample,toinstallmorememory.Ahostentersor
leavesmaintenancemodeonlyastheresultofauserrequest.
esxcli system maintenanceMode setallowsyoutoenableordisablemaintenancemode.
Whenyourunthevicfg-hostopsvCLIcommand,youcanspecifyone
oftheoptionslistedin“Connection
OptionsforvCLIHostManagementCommands”onpage 18inplaceof<conn_options>.
To enter and exit maintenance mode
1Runesxcli <conn_options> system maintenanceMode set --enable true toentermaintenance
mode.
Afterallvirtualmachinesonthehosthavebeensuspendedormigrated,thehostentersmaintenance
mode.Youcannotdeployorpoweronavirtualmachineon
hostsinmaintenancemode.