我的客户问我如何配置虚拟机开机顺序启动集群
例子
域控制器先上电
Exchange Server电源立即打开
应用服务器第三次打开电源
我的客户只有PE
谢谢你回答问题。
最佳答案EricUMD
- Connect to cluster<\/li>\t
- Power on first VM<\/li>\t
- Wait for a set number for minutes or use a ping command to determine network status<\/li>\t
- Power on second VM<\/li>\t
- Repeat steps 3 and 4<\/li><\/ol>
Below is some fairly crude code that should work.<\/p>
[cmdletbinding]
param(
[Parameter(mandatory=$true)][String[]]$VMNames
)
$ntnxpsLoaded = Get-PSSnapin -Name NutanixCmdletsPSSnapin -ErrorAction SilentlyContinue | %($_.Name)
if($ntnxpsLoaded -eq $null) {
Add-PSSnapin -Name NutanixCmdletsPSSnapin
}
Connect-NTNXCluster -Server <DNS\/IP> -UserName <acct> -Password (Get-Credential).Password
foreach ($VM in $VMNames) {
Set-NTNXVMPowerOn -vmid (Get-NTNXVM -SearchString $VM).vmid
Start-Sleep -Seconds 300
}<\/code><\/pre>\u00a0<\/p>","className":"post__content__best_answer"}">