GracefulShutdownofVMwareESXiusingNetworkShutdownModuleConfiguringNetworkShutdownModuleforgracefulshutdownofESXihosts21TableofContents2Introduction33Deployment33.
1Prerequisites.
33.
2PowerShellConfiguration.
43.
2.
1PowerShellExecutionPolicy.
43.
2.
2HandlingInvalidCertificates.
44ShutdownConfigurations54.
1StandaloneESXiShutdown.
54.
1.
1StandaloneESXiShutdownProcedure74.
2ESXiClusterShutdown84.
2.
1ClusterShutdownProcedure.
932IntroductionNetworkShutdownModule3.
07includesPowerShellscriptswhichallowforgracefulshutdownofVMwareESXihostsandtheirVirtualMachines(VMs)inthecaseofUPSevents.
Thisdocumentdescribeshowtoconfigureyourenvironmenttoenabletheuseofthesescripts.
BydefaultinaVMwareHighAvailabilityClusterenvironmenttheVirtualMachineStartup/Shutdownfeatureisdisabledbydesign.
ThismeansthatwhenNetworkShutdownModuleissuesacommandtoshutdownESXihostsinresponsetoacriticalUPSeventtheVMsrunningonthosehostswillnotbeshutdowncleanly.
NOTE:Thescriptsshouldbetestedinanon–productionenvironmentbeforeuseonproductionservers.
3DeploymentFigure1-ESXiDeploymentAnexampledeploymentforESXiprotectionisshowninFigure1.
OneormoreUPSunitswillprovidepowertotheESXiandtheNetworkShutdownModulehosts.
TheNetworkShutdownModulehostisconfiguredtomonitortheUPS(s)andwhenaUPSeventoccurs,runstheshutdownscriptstogracefullyshutdownthevirtualmachinesandtheESXIhost.
3.
1PrerequisitesTheNetworkShutdownModuleHostmustberunningacompatibleWindowsServeroperatingsystem.
Seeproductdocumentationforalistofcompatibleoperatingsystems.
TheshutdownscriptsrequireWindowsPowerShell.
Downloadandinstallationinstructionsforyouroperatingsystemcanbefoundonwww.
microsoft.
com/powershell.
TheshutdownscriptsrequireVMwarevSpherePowerCLI.
Downloadandinstallationinstructionsforyouroperatingsystemcanbefoundonwww.
vmware.
com/go/powercli.
43.
2PowerShellConfiguration3.
2.
1PowerShellExecutionPolicyPleasebyawarethattheprovidedshutdownscriptswillsettheexecutionpolicyforPowerShellto'RemoteSigned'.
MoreinformationonexecutionpoliciescanbeMicrosoftPowerShelldocumentation:http://us/library/ee176961.
aspx3.
2.
2HandlingInvalidCertificatesTheshutdownscriptsmakeuseoftheVMtothetargetESXihostorvCenterServerinvalidoruntrustedSSLcertificate,thecurrentimplementationatthetimeofwritingwillissueawarning.
AnexampleofsuchawarningisgiveInvalidCertificateActionpolicy.
Atthetimeofwritingthisguide,thedefaultpolicyis'unset',whichwillresultinawarningbeingissued.
Figure2-InvalidCertificateWarningInfutureversionsofthePowerCLI,foraddedsecurity,theuntrusteddenied.
Toavoidthissituation,werecommendyousetanInvalidCertificateActiononeofeither'Ignore'or'Fail'.
Ifthepolicyissetto'fail',thecmdletwillnotestablishaconnectionifthecertificateisnotvalid.
Inthiscase,youmustuploadavalidcertificatetotheESXihostensurethatshutdownprotectioncanbeprovided.
PowerShellConfigurationPowerShellExecutionPolicyPleasebyawarethattheprovidedshutdownscriptswillsettheexecutionpolicyforMoreinformationonexecutionpoliciescanbefoundinMicrosoftPowerShelldocumentation:http://technet.
microsoft.
com/en-HandlingInvalidCertificatesTheshutdownscriptsmakeuseoftheVMwarePowerCLIConnect-VIServercmdletorvCenterServerviaasecurehttpschannel.
IftheserverpresentsaninvalidoruntrustedSSLcertificate,thecurrentimplementationatthetimeofwritingwillissueAnexampleofsuchawarningisgiveninFigure2.
Thisisdefinedinlinewiththepolicy.
Atthetimeofwritingthisguide,thedefaultpolicyis'unset',whichwillresultinawarningbeingissued.
InfutureversionsofthePowerCLI,foraddedsecurity,theuntrustedconnectionmaybedenied.
Toavoidthissituation,werecommendyousetanInvalidCertificateActionIfthepolicyissetto'fail',thecmdletwillnotestablishaconnectionifthecertificateisnotInthiscase,youmustuploadavalidcertificatetotheESXihostorvCenterServerensurethatshutdownprotectioncanbeprovided.
PleasebyawarethattheprovidedshutdownscriptswillsettheexecutionpolicyforfoundinVIServercmdlettoconnectviaasecurehttpschannel.
IftheserverpresentsaninvalidoruntrustedSSLcertificate,thecurrentimplementationatthetimeofwritingwillissueThisisdefinedinlinewiththepolicy.
Atthetimeofwritingthisguide,thedefaultpolicyis'unset',connectionmaybedenied.
Toavoidthissituation,werecommendyousetanInvalidCertificateActionpolicytoIfthepolicyissetto'fail',thecmdletwillnotestablishaconnectionifthecertificateisnotorvCenterServerto5Withthepolicyissetto'ignore',thecmdletwillestablishtheconnectionwithouttakingintoaccountthatthecertificateisinvalid.
Figure3showsanexampleofsettingtheInvalidCertificateActionpolicy.
Figure3-SettingtheInvalidCertificateActionSeethePowerCLIcmdletreferenceformoreinformationonboththeConnectSet-PowerCLIConfigurationcmdlets.
Thisisavailableat:https://pubs.
vmware.
com/vsphere55/topic/com.
vmware.
powercli.
cmdletref.
doc/Overview.
html4ShutdownConfigurati4.
1StandaloneESXiShutdownToconfiguregracefulshutdownofstandaloneESXihosts,usethefollowingsteps:1.
AccessthevSphereClient,selectyourESXihost,thentheconfigurationtab.
2.
ClickontheVirtualMachineStartup/Shutdownlink.
Click'properttodisplaythe'VirtualMachineStartupandShutdown'dialog,asshownin3.
Ensurethat"Allowvirtualmachinestostartandstopchecked.
4.
Use'MoveUp'tomoveVMsintotheinthe'ManualStartup'grouparenotgracefullystartedorstoppedwiththeESXihost.
5.
EnsuretheVMsarelistedorderoftheVMs.
Shutdownusesthereverseofthisorder,sothelastonthelistwillbethefirsttoshutdown.
6.
Changethe'ShutdownAction'tospecify'GuestShutdown'.
ClickOK,todismissthisdialog.
7.
EnsurethatVMwareToolsareinstalledoneachVM.
ThisisrequiredforgracefulshutdownoftheVM.
Withthepolicyissetto'ignore',thecmdletwillestablishtheconnectionwithouttakingintoficateisinvalid.
showsanexampleofsettingtheInvalidCertificateActionpolicy.
SettingtheInvalidCertificateActionSeethePowerCLIcmdletreferenceformoreinformationonboththeConnect-VIServerandPowerCLIConfigurationcmdlets.
Thisisavailableat:pubs.
vmware.
com/vsphere-55/topic/com.
vmware.
powercli.
cmdletref.
doc/Overview.
htmlShutdownConfigurationsShutdownToconfiguregracefulshutdownofstandaloneESXihosts,usethefollowingsteps:AccessthevSphereClient,selectyourESXihost,thentheconfigurationtab.
ClickontheVirtualMachineStartup/Shutdownlink.
Click'properties'atthetoprighttodisplaythe'VirtualMachineStartupandShutdown'dialog,asshowninEnsurethat"Allowvirtualmachinestostartandstopautomaticallywiththesystem"isse'MoveUp'tomoveVMsintothe'AnyOrder',or'AutomaticStartup'groups.
VMsinthe'ManualStartup'grouparenotgracefullystartedorstoppedwiththeESXihost.
arelistedintheorderyouwant.
NotethatthisrepresentsthestartuporderoftheVMs.
Shutdownusesthereverseofthisorder,sothelastonthelistwillbethefirsttoshutdown.
Changethe'ShutdownAction'tospecify'GuestShutdown'.
ClickOK,todismissthisEnsurethatVMwareToolsareinstalledoneachVM.
ThisisrequiredforgracefulWiththepolicyissetto'ignore',thecmdletwillestablishtheconnectionwithouttakingintoVIServerandToconfiguregracefulshutdownofstandaloneESXihosts,usethefollowingsteps:AccessthevSphereClient,selectyourESXihost,thentheconfigurationtab.
ies'atthetoprighttodisplaythe'VirtualMachineStartupandShutdown'dialog,asshowninFigure4.
automaticallywiththesystem"is',or'AutomaticStartup'groups.
VMsinthe'ManualStartup'grouparenotgracefullystartedorstoppedwiththeESXihost.
.
NotethatthisrepresentsthestartuporderoftheVMs.
Shutdownusesthereverseofthisorder,sothelastonthelistwillChangethe'ShutdownAction'tospecify'GuestShutdown'.
ClickOK,todismissthisEnsurethatVMwareToolsareinstalledoneachVM.
Thisisrequiredforgraceful68.
EnsurethatthePowerControlsforeachVMarecorrect.
ForeachVM,rightclickandselectEditSettings>OptionsTab>VMwareTools.
UnderPowerControlsStop,ensurethat'ShutDownGuest'isdisplayed.
AnexampleisdisplayedinFigure5.
9.
OntheNetworkShutdownModuleHost,installthePowerShellandPowerCLIprerequisites,asoutlinedinsection3.
1.
10.
InstallSchneiderElectricNetworkShutdownModule3.
07onasupportedWindowsServerOS.
OncecompletetheshutdownscriptscanbefoundunderC:\ProgramFiles\SE\NetworkShutdownModule\esxi,oronthecustompathchosenatinstalltime.
11.
Open"esxi_shutdown.
bat"inatexteditorandeditthefollowingscriptvariablesasrequired:a.
SERVER:TheIPaddressoftheESXiHost.
b.
USERNAME:UseraccountwithAdministratorprivilegesfortheESXiHost.
c.
PASSWORD:Passwordfortheuseraccountabove.
d.
OSSHUTDOWNDELAY:Adelayinseconds.
ThisdelayispassedtotheshutdownprocedureoftheNSMhost;togiveusersawarningthatshutdownisimminent.
12.
Verifythatthepathsspecifiedarecorrectandeditthemasrequired.
Thedefaultpathsgivenmaybedifferentdependingonyourhost,e.
g.
ifyouareusinga32bitor64bitversionofWindows.
a.
POWERSHELL_PATH:Thepathtothepowershell.
exeexecutable.
b.
VMWARE_PATH:Thepathtothevim.
psc1fileinstalledaspartoftheVMwarePowerCLI.
c.
SCRIPT_PATH:Thepathtotheshutdown.
ps1scriptinstalledwithNetworkShutdownModule.
d.
LOG_PATH:Apathtoafolderwherescriptlogswillbecreated.
Pleaseensurethisisalocalwritablelocation,otherwisetheshutdownscriptwillfailtocreateanexecutionlog.
13.
IntheNetworkShutdownModuleuserinterfacegototheActions(advanced)->SystemShutdown->Settingspage.
14.
Enterthefullpathtoesxi_shutdown.
batunder"Commandline".
Ifthispathcontainsspaces,ensurethefullpathiswithinquotes.
15.
GototheShutdownsettingspage,anddeselect"UsecentralconfigurationprovidedbyNetworkManagementCard/Proxy".
16.
Enteradurationvalueinsecondsunder"Shutdownduration".
NOTE:ThisvaluemustbelongenoughtoallowalloftheVMstobeshutdowncleanlyfollowedbytheESXiandNetworkShutdownModulehosts.
17.
GototheActions(advanced)->SystemShutdown->Eventspage.
Select/CheckaNotificationAlarmtoinitiatetheshutdown,forexample,UtilityFailureandSavechange(s).
7Figure4-VirtualMachineStartupandShutdown4.
1.
1StandaloneESXiShutdownProcedureTheshutdownsequenceoccursasfollows:1.
UPSgoesonBattery.
2.
Theconfiguredbatfileisexecuted(PowerShellscript(shutdown.
ps1).
3.
ThisscriptattachestotheESXihost,andtriggersaP4.
ThescriptsavesalogofrunningVMstovmlist.
csvinthelogdirectory.
Alogofactionsperformedbythescriptisalsosavedhere.
5.
TheESXihostreactsasitisconfiguredto,andsuspendsorpowersofftheVMs.
6.
TheESXihostthenshuts7.
AfterOSSHUTDOWNDELAYsecondsdown.
8.
OnceallcomputersconnectedtotheUPShavebeenshutdown,theUPSshutsoff(interruptsthesupplyofpowertotheloads)toprotectthebattery.
NOTE:ThisfunctionisnotauthorisedonsomeUPSs.
9.
AssumingtheUPSshutofffunctionisavailable,whenpowerisrestored,theUPSwillrestartprovidingpowertoattachedequipment.
UsingBIOSsettingsontheESXIhostsyoumaybeabletoinitiateasystemstartwhenVirtualMachineStartupandShutdownShutdownProcedureTheshutdownsequenceoccursasfollows:Theconfiguredbatfileisexecuted(esxi_shutdown.
bat),whichcallstheassociatedscript(shutdown.
ps1).
scriptattachestotheESXihost,andtriggersaPowerOffaction.
ThescriptsavesalogofrunningVMstovmlist.
csvinthelogdirectory.
Alogofactionsperformedbythescriptisalsosavedhere.
TheESXihostreactsasitisconfiguredto,andsuspendsorpowersofftheVMs.
sdown.
OSSHUTDOWNDELAYseconds,theNetworkShutdownModulehostOnceallcomputersconnectedtotheUPShavebeenshutdown,theUPSshutsoff(interruptsthesupplyofpowertotheloads)toprotectthebattery.
nisnotauthorisedonsomeUPSs.
AssumingtheUPSshutofffunctionisavailable,whenpowerisrestored,theUPSwillrestartprovidingpowertoattachedequipment.
UsingBIOSsettingsontheESXIhostsyoumaybeabletoinitiateasystemstartwhenpowerisrestored.
shutdown.
bat),whichcallstheassociatedThescriptsavesalogofrunningVMstovmlist.
csvinthelogdirectory.
AlogofactionsTheESXihostreactsasitisconfiguredto,andsuspendsorpowersofftheVMs.
heNetworkShutdownModulehostwillshutOnceallcomputersconnectedtotheUPShavebeenshutdown,theUPSshutsoffAssumingtheUPSshutofffunctionisavailable,whenpowerisrestored,theUPSwillrestartprovidingpowertoattachedequipment.
UsingBIOSsettingsontheESXIhosts8Figure5-VMwareToolsSettings4.
2ESXiClusterShutdownToconfigureshutdownforanESXi1.
InstallthePowerShellandPowerCLIprerequisites,asoutlinedinsection2.
InstallSchneiderElectricNetworkShutdownModule3.
07ServerOS.
OncecompletetheshutdownscriptscanbefoundunderC:Files\SE\NetworkShutdownModule3.
Open"hashutdown.
bat"inatexteditorandeditthefollowingscriptvariablesasrequired:a.
SERVER:TheIPaddressoftheESXihostb.
USERNAME:UseraccountwithAdministratorprivilegesfortheESXihostorvCenterc.
PASSWORD:Passwordfortheuseraccountabove.
d.
DATACENTER:NameofthedatacentrecontainerthatcontainstheCLUSTER.
ESXiClusterShutdownESXiClusterenvironment,usethefollowingsteps:InstallthePowerShellandPowerCLIprerequisites,asoutlinedinsection3.
1InstallSchneiderElectricNetworkShutdownModule3.
07onasupported.
OncecompletetheshutdownscriptscanbefoundunderC:\ProgramNetworkShutdownModule\esxi,oronthecustompathchosenatinstalltime.
Open"hashutdown.
bat"inatexteditorandeditthefollowingscriptvariablesasSERVER:TheIPaddressoftheESXihostorvCenterServer.
USERNAME:UseraccountwithAdministratorprivilegesfortheESXiServer.
PASSWORD:Passwordfortheuseraccountabove.
DATACENTER:Nameofthedatacentrecontainerthatcontainsthe3.
1.
supportedWindowsProgramchosenatinstalltime.
Open"hashutdown.
bat"inatexteditorandeditthefollowingscriptvariablesasUSERNAME:UseraccountwithAdministratorprivilegesfortheESXiDATACENTER:Nameofthedatacentrecontainerthatcontainsthe9e.
CLUSTER:NameoftheclusterthatcontainstheESXihoststobeshutdown.
f.
VMSHUTDOWNDELAY:AVMshutdowndelay,specifiedinseconds.
AfterrequestingaShutDownfortheVM,thescriptwillwaitthislongtoallowtimefortheVMshutdownproceduretocomplete.
Oncethisdelayhaselapsed,aPowerOffcommandisgiven.
ThevalueforthisfieldshouldbesufficientlylongtoallowgracefulshutdownofyourVMs.
g.
OSSHUTDOWNDELAY:Adelayinseconds.
ThisdelayispassedtotheshutdownprocedureoftheNSMhost;togiveusersawarningthatshutdownisimminent.
4.
Verifythatthepathsspecifiedarecorrectandeditthemasrequired.
Thedefaultpathsgivenmaybedifferentdependingonyourhost,e.
g.
ifyouareusinga32bitor64bitversionofWindows.
a.
POWERSHELL_PATH:Thepathtothepowershell.
exeexecutable.
b.
VMWARE_PATH:Thepathtothevim.
psc1fileinstalledaspartoftheVMwarePowerCLI.
c.
SCRIPT_PATH:Thepathtotheshutdown.
ps1scriptinstalledwithNetworkShutdownModule.
d.
LOG_PATH:Apathtoafolderwherescriptlogswillbecreated.
Pleaseensurethisisalocalwritablelocation,otherwisetheshutdownscriptwillfailtocreateanexecutionlog.
5.
IntheNetworkShutdownModuleuserinterfacegototheActions(advanced)->SystemShutdown->Settingspage.
6.
Enterthefullpathtohashutdown.
batunder"Commandline".
Ifthispathcontainsspaces,ensurethefullpathiswithinquotes.
Click"SaveChanges"toapply.
7.
GototheShutdownsettingspage,anddeselect"UsecentralconfigurationprovidedbyNetworkManagementCard/Proxy".
8.
Enteradurationvalueinsecondsunder"Shutdownduration".
Click"SaveChanges"toapply.
NOTE:ThisvaluemustbelongenoughtoallowalloftheVMstobeshutdowncleanlyfollowedbytheESXiandNetworkShutdownModulehosts.
9.
GototheActions(advanced)->SystemShutdown->Eventspage.
Select/CheckaNotificationAlarmtoinitiatetheshutdown,forexample,UtilityFailureandSavechange(s).
4.
2.
1ClusterShutdownProcedureTheshutdownsequenceoccursasfollows:1.
UPSgoesonBattery.
2.
Theconfiguredbatfileisexecuted(hashutdown.
bat),whichcallstheassociatedPowerShellscript(hashutdown.
ps1).
3.
ThisscriptattachestotheESXihostorvCenterServer,andenumeratesthepoweredonVMsinthecluster.
TheseVMsaresavedtothevmlist.
csvfileinthelogdirectory.
a.
PleaseNote:OnlythoseVMswhichareassociatedwithhostswhichareinthe"Connected"or"Maintenance"statesareenumerated.
VMsassociatedwithhostsinthe"Disconnected"or"NotResponding"statescannotbeenumerated,andtheirhostscannotbesafelyshutdownbythisscript.
4.
Thescriptattemptstoshutdowneachvirtualmachineinthecluster.
10NOTE:VMwaretoolsmustbeinstalledoneachVM,otherwiseaPowerOffcommandissent.
5.
AfterVMSHUTDOWNDELAYseconds,thescriptchecksforanyremainingVMsthatarepoweredonandissuesapoweroffcommandtothosethatarestillrunning.
ThisisnecessarytoallowtheESXihost(s)toentermaintenancemode.
6.
IftheESXihostisinthe"Connected"state,thescriptwillthencommandtheESXihost(s)toentermaintenancemode.
7.
ThentheESXihostsareshutdown.
8.
AfterOSSHUTDOWNDELAYseconds,theNetworkShutdownModulehostwillshutdown.
TheNetworkShutdownModulehostwillalwaysshutdownafterallESXihostshaveshutdown.
9.
OnceallcomputersconnectedtotheUPShavebeenshutdown,theUPSshutsoff(interruptsthesupplyofpowertotheloads)toprotectthebattery.
NOTE:ThisfunctionisnotauthorisedonsomeUPSs.
10.
AssumingtheUPSshutofffunctionisavailable,whenpowerisrestored,theUPSwillrestartprovidingpowertoattachedequipment.
UsingBIOSsettingsontheESXihostsyoumaybeabletoinitiateasystemstartwhenpowerisrestored.
NOTE:ESXihostswillpowerupinmaintenancemode.
**ENDOFDOCUMENT**
ZJI发布了一款7月份特别促销独立服务器:香港邦联四型,提供65折优惠码,限量30台(每用户限购1台),优惠后每月520元起。ZJI是原来Wordpress圈知名主机商家:维翔主机,成立于2011年,2018年9月启用新域名ZJI,提供中国香港、台湾、日本、美国独立服务器(自营/数据中心直营)租用及VDS、虚拟主机空间、域名注册等业务。下面列出这款服务器的配置信息。香港邦联四型CPU:2*E5-2...
国庆钜惠 最低5折起 限量促销CYUN专注海外精品服务器资源,主营香港CN2 GIA、美国CERA、美国高防服务器资源,实体公司,ISP/IDC资质齐全,客服配备齐全。本次针对国庆推出非常给力的促销活动,旗下所有平台同享,新老客户同享,限时限量,售完截止。活动截止时间:2021年10月9日官网地址:www.cyun.net参与机型:香港CN2 GIA云服务器、香港双程CN2云服...
也有在上个月介绍到糖果主机商12周年的促销活动,我有看到不少的朋友还是选择他们家的香港虚拟主机和美国虚拟主机比较多,同时有一个网友有联系到推荐入门的个人网站主机,最后建议他选择糖果主机的迷你主机方案,适合单个站点的。这次商家又推出所谓的秋季活动促销,这里一并整理看看这个服务商在秋季活动中有哪些值得选择的主机方案,比如虚拟主机最低可以享受六折,云服务器可以享受五折优惠。 官网地址:糖果主机秋季活动促...
vmware tools 安装为你推荐
暴风影音怎么截图如何在暴风影音中截图?湖南商标注册湖南长沙怎么注册商标中国论坛大全安徽论坛都有哪些?网站联盟网站联盟的运作流程创维云电视功能谁能具体介绍一下创维云电视的主要功能,以及基本的使用方式,如果能分型号介绍就更好了,O(∩_∩)O谢谢mate8价格华为mate8市场价多少2012年正月十五山西省太原市2012年正月十五活动的相关情况商标注册查询官网商标注册查询官方网站?机械键盘轴机械键盘什么轴好,机械键盘轴有几种srv记录exchange 2010 自动发现需不需要srv记录
域名服务器的作用 域名服务器是什么 国外私服 谷歌香港 sockscap 美国php主机 国内加速器 国内php空间 权嘉云 hktv 万网空间购买 空间租赁 双线asp空间 视频服务器是什么 阿里云官方网站 太原联通测速 阿里云手机官网 xuni 带宽测试 谷歌搜索打不开 更多