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**
Sharktech(鲨鱼服务器商)我们还是比较懂的,有提供独立服务器和高防服务器,而且性价比都还算是不错,而且我们看到有一些主机商的服务器也是走这个商家渠道分销的。这不看到鲨鱼服务器商家洛杉矶独立服务器纷纷促销,不限制流量的独立服务器起步99美元,这个还未曾有过。第一、鲨鱼机房服务器方案洛杉矶机房,默认1Gbps带宽,不限流量,自带5个IPv4,免费60Gbps / 48Mpps DDoS防御。C...
LOCVPS发布了7月份促销信息,全场VPS主机8折优惠码,续费同价,同时香港云地/邦联机房带宽免费升级不加价,原来3M升级至6M,2GB内存套餐优惠后每月44元起。这是成立较久的一家国人VPS服务商,提供美国洛杉矶(MC/C3)、和中国香港(邦联、沙田电信、大埔)、日本(东京、大阪)、新加坡、德国和荷兰等机房VPS主机,基于XEN或者KVM虚拟架构,均选择国内访问线路不错的机房,适合建站和远程办...
IMIDC是一家香港本土运营商,商家名为彩虹数据(Rainbow Cloud),全线产品自营,自有IP网络资源等,提供的产品包括VPS主机、独立服务器、站群独立服务器等,数据中心区域包括香港、日本、台湾、美国和南非等地机房,CN2网络直连到中国大陆。目前主机商针对日本独立服务器做促销活动,而且提供/28 IPv4,国内直连带宽优惠后每月仅88美元起。JP Multiple IP Customize...
vmware tools 安装为你推荐
赵雨润星辰变电影是真的启动了吗?雅虎社区雅虎是中国的吗在线漏洞检测漏洞扫描工具有哪些中国电信互联星空怎么在中国电信网上营业厅自行开通互联星空消费权限ghostxp3目前最好的ghost xp3是什么?arm开发板单片机开发板与ARM开发板有什么不同?网站联盟网盟跟b2b平台有什么区别数码资源网有什么网站弄相片效果比较好的?迅雷云点播账号求一个迅雷云点播vip的账号,只是看的,绝不动任何手脚。雅虎天盾雅虎天盾、瑞星杀毒软件、瑞星防火墙、卡卡上网安全助手能同时使用吗?
如何注册域名 泛域名 移动服务器租用 域名查询系统 天津服务器租赁 万网域名代理 老左 狗爹 sugarsync 监控宝 dux 七夕促销 域名接入 qq对话框 河南移动网 稳定免费空间 paypal注册教程 免费网页申请 国外ip加速器 Updog 更多