6.0

Table Of Contents
VMware, Inc. 23
Chapter 2 Managing Hosts
2Runesxcli <conn_options> system maintenanceMode set --enable false tohaveahost
existingmaintenancemode.
Ifyouattempttoexitmaintenancemodewhenthehostisnolongerinmaintenancemode,anerrorinforms
youthatmaintenancemodeisalreadydisabled.
Entering and Exiting Maintenance Mode with vicfg-hostops
Youplaceahostinmaintenancemodetoserviceit,forexample,toinstallmorememory.Ahostentersor
leavesmaintenancemodeonlyastheresultofauserrequest.
vicfg-hostopssuspendsvirtualmachinesbydefault,orpowersoffthevirtualmachineifyourun
vicfg-hostops --action poweroff.
ThehostisinastateofEnteringMaintenanceModeuntilallrunningvirtualmachinesaresuspendedor
migrated.Whenahostisenteringmaintenancemode,youcannotpoweronvirtualmachinesonitormigrate
virtualmachinestoit.
Whenyourunthevicfg-hostopsvCLIcommand,youcanspecifyoneoftheoptionslisted
in“Connection
OptionsforvCLIHostManagementCommands”onpage 18inplaceof<conn_options>.
To enter maintenance mode
1Runvicfg-hostops <conn_options> --operation entertoentermaintenancemode.
2Runvicfg-hostops <conn_options> --operation infotocheckwhetherthehostisinmaintenance
modeorintheEnteringMaintenanceModestate.
Afterallvirtualmachinesonthehosthavebeensuspendedormigrated,
thehostentersmaintenancemode.
Youcannotdeployorpoweronavirtualmachineonhostsinmaintenancemode.
Youcanputallhostsinaclusterordatacenterinmaintenancemodebyusingthe--clusteror
--datacenteroption.Donotusethoseoptionsunlesssuspendingallvirtualmachinesin
thatclusterordata
centerisnoproblem.
Youcanlaterrunvicfg-hostops <conn_options> --operation exittoexitmaintenancemode.
Backing Up Configuration Information with vicfg-cfgbackup
AfteryouconfigureanESXihost,youcanbackupthehostconfigurationdata.Alwaysbackupyourhost
configurationafteryouchangetheconfigurationorupgradetheESXiimage.
Backup Tasks
Duringaconfigurationbackup,theserialnumberisbackedupwiththeconfiguration.Thenumberisrestored
whenyourestoretheconfiguration.Thenumberisnotpreserv edwhenyouruntheRecoveryCD(ESXi
Embedded)orperformarepairoperation(ESXiInstallable).
Youcanbackupandrestoreconfigurationinformationas
follows.
1 Backuptheconfigurationbyusingthevicfg-cfgbackupcommand.
2RuntheRecoveryCDorrepairoperation
3Restoretheconfigurationbyusingthevicfg-cfgbackupcommand.
Whenyourestoreaconfiguration,youmustmakesurethatallvirtualmachinesonthehostarestopped.
N
OTEvicfg-hostopsdoesnotworkwithVMwareDRS.Virtualmachinesarealwayssuspended.
IMPORTANTThevicfg-cfgbackupcommandisavailableonlyforESXihosts.Thecommandisnotavailable
throughavCenterServersystemconnection.NoequivalentESXCLIcommandissupported.