我的客户询问我如何在启动群集时配置VM电源
例子
域控制器首先电源
第二次交换服务器电源
应用服务器电源第三个
我的客户只有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"}">