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**
昨天,遇到一个网友客户告知他的网站无法访问需要帮他检查到底是什么问题。这个同学的网站是我帮他搭建的,于是我先PING看到他的网站是不通的,开始以为是服务器是不是出现故障导致无法打开的。检查到他的服务器是有放在SugarHosts糖果主机商中,于是我登录他的糖果主机后台看到服务器是正常运行的。但是,我看到面板中的IP地址居然是和他网站解析的IP地址不同。看来官方是有更换域名。于是我就问 客服到底是什...
virmach这是第二波出这种一次性周期的VPS了,只需要缴费1一次即可,用完即抛,也不允许你在后面续费。本次促销的是美国西海岸的圣何塞和美国东海岸的水牛城,周期为6个月,过后VPS会被自动且是强制性取消。需要临时玩玩的,又不想多花钱的用户,可以考虑下!官方网站:https://www.virmach.comTemporary Length Service Specials圣何塞VPS-一次性6个...
在之前的一些文章中有提到HostYun商家的信息,这个商家源头是比较老的,这两年有更换新的品牌域名。在陆续的有新增机房,价格上还是走的低价格路线,所以平时的折扣力度已经是比较低的。在前面我也有介绍到提供九折优惠,这个品牌商家就是走的低价量大为主。中秋节即将到,商家也有推出稍微更低的88折。全场88折优惠码:moon88这里,整理部分HostYun商家的套餐。所有的价格目前都是原价,我们需要用折扣码...
vmware tools 安装为你推荐
依赖注入依赖注入到底是为了解决什么问题的网站运营一般网站如何运营如何建立自己的网站怎么创建自己的网站什么是云平台谁能简单说一下什么是云平台啊?网站优化方案网站优化方法有哪些宽带接入服务器用wifi连不上服务器怎么办三星s8什么时候上市大约什么时候买S8合适中国杀毒软件排行榜杀毒软件的最新排名?中国的排名?adobephotoshop教程怎样学会使用Adobe Photoshop?腾讯免费升级win10腾讯免费升级win10可以用多久
济南域名注册 厦门域名注册 二级域名申请 n点虚拟主机管理系统 特价空间 卡巴斯基永久免费版 全站静态化 老左来了 gtt 搜索引擎提交入口 免费网页空间 可外链的相册 江苏徐州移动 乐视会员免费领取 godaddy域名 weblogic部署 neobux ddos攻击软件 ddos攻击教程 dhcp服务器是什么 更多