update
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#!/usr/bin/env pwsh
|
||||
|
||||
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false | Out-Null
|
||||
. /opt/idssys/powerwall/settings.ps1
|
||||
|
||||
$ESXI = Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null
|
||||
|
||||
22
esxi-scripts/set-drs.ps1
Executable file
22
esxi-scripts/set-drs.ps1
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env pwsh
|
||||
|
||||
. /opt/idssys/powerwall/settings.ps1
|
||||
|
||||
$ESXI = Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null
|
||||
|
||||
|
||||
$spec = New-Object VMware.Vim.ClusterConfigSpecEx
|
||||
$spec.DrsConfig = New-Object VMware.Vim.ClusterDrsConfigInfo
|
||||
|
||||
$spec.DrsConfig.Option = New-Object VMware.Vim.OptionValue[] (1)
|
||||
$spec.DrsConfig.Option[0] = New-Object VMware.Vim.OptionValue
|
||||
$spec.DrsConfig.Option[0].Key = 'MaxVcpusPerCore'
|
||||
$spec.DrsConfig.Option[1].Value = "3"
|
||||
|
||||
$modify = $true
|
||||
$cluster_ID= Get-Cluster -Name "iDS-Cluster"
|
||||
$_this = Get-View -Id $cluster_ID.Id
|
||||
$_this.ReconfigureComputeResource_Task($spec, $modify)
|
||||
|
||||
|
||||
Disconnect-VIServer $ESXI -Confirm:$false
|
||||
Reference in New Issue
Block a user