after some testing, it seems it's the step of VM removal that take a considerable amount of time.
As it is uncompressible, for our need we'll go in another way.
Original Message:
Sent: Oct 31, 2024 07:19 AM
From: LucD
Subject: Remove-VMHost very slow on a Cluster versus other Clusters
Not really.
I would have a look at the vpxd logs to check if there any clues in there.
------------------------------
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Original Message:
Sent: Oct 31, 2024 06:52 AM
From: Benjamin MARY
Subject: Remove-VMHost very slow on a Cluster versus other Clusters
Hello Luc,
I have tested by disabling all DRS Rules, no change, even by disabling HA & DRS on Cluster, no change.
Any idea ?
Original Message:
Sent: Oct 25, 2024 11:25 AM
From: LucD
Subject: Remove-VMHost very slow on a Cluster versus other Clusters
I don't think that the Try-Catch construct explains the huge difference in execution time.
Btw, that Sort-Object is not really necessary, it doesn't matter if the ESXi nodes are removed in alphabetical order.
------------------------------
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Original Message:
Sent: Oct 25, 2024 09:30 AM
From: Benjamin MARY
Subject: Remove-VMHost very slow on a Cluster versus other Clusters
Hello Luc,
In fact there are few DRS rules in this Cluster.
As It's dev environment, I'll try to disabling DRS Rules at first to see any change.
Then I'll come back if still slow.
By the way just saw a colleague doing it like below and it seems faster than my method and don't have the problem on the specific Cluster :
$FailedESX = $Cluster | Get-VMHost | ?{ $_.ConnectionState -eq 'NotResponding' } | Sort-Object Name
ForEach ($ESX in $FailedESX) { $ESX| Remove-VMHost -Confirm:$False }
My Method :
$FailedESX = $Cluster | Get-VMHost | ?{ $_.ConnectionState -eq 'NotResponding' } | Sort-Object Name
ForEach ( $ESX in $FailedESX) {
Try { Remove-VMHost -VMHost $ESX -Confirm:$False -EA Stop }
Catch [VMware.VimAutomation.ViCore.Types.V1.ErrorHandling.ManagedObjectNotFound] { Write in log File }
Catch [ System.Management.Automation.RuntimeException ] {Write in log File }
}
Original Message:
Sent: Oct 25, 2024 05:41 AM
From: LucD
Subject: Remove-VMHost very slow on a Cluster versus other Clusters
Does the removal of an ESXi node from the cluster trigger a lot of vMotions?
Are there any DRS rules defined that might trigger vMotions?
------------------------------
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Original Message:
Sent: Oct 25, 2024 05:20 AM
From: Benjamin MARY
Subject: Remove-VMHost very slow on a Cluster versus other Clusters
Hello all,
I'm facing a small problem regading Hosts removal from Clusters.
On a particular Cluster, removing an Host will take 20 minutes, instead of 2-3 minutes on others Clusters.
This Cluster have significantly more VM than others Clusters, could it be the reason ?
Cordiallly