PowerCLI: Unfreeze/Resume Your Virtual Machines
NOTE: I published this article a bit earlier, but due to the fact that this was a not-yet-released feature I removed this post once again. Since this feature is released for a long time already I deciced to re-publish it, enjoy!
–
Last night I got a message from our monitoring system that one of our NFS-volumes on our NetApp SAN was almost full but at this particular moment I was driving home and by the time I got home the NFS volume was completely full which resulted in the Virtual Machines freezing up.
After sizing up the NFS volume the machines do not automatically start to ‘unfreeze’ again, and they were waiting for me to answer the question in the vSphere client to “Retry” or “Abort”. Ofcourse I could’ve just answered “Retry” on each machine to get them going again, but I thought it would be nicer to solve this with the almighty PowerCLI since it were like 30 Virtual Machines.
Get-Cluster "Your Cluster" | Get-VM | Sort | Get-VMQuestion | ` Set-VMQuestion -Option "Retry" -Confirm:$false
This will result in answering all machines waiting to continue with the “Retry” option in your cluster (in this example I used “Your Cluster” as clustername).
I hope you won’t be needing it much, but if you do it will be handy