Hi,
Is it possible to script a CLEAN poweroff for all my VM on a cluster (RedHat and Windows). Idem for poweron.
If YES, can you give me lines to put in the batch
Thx
Yes, this initiates a shutdown through the guest OS.
For a cluster you could do
Get-Cluster -Name <your-clustername> | Get-VM | Shutdown-VMGuest -Confirm:$false
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
If you have the VMware Tools installed you can do
Get-VM | Shutdown-VMGuest -Confirm:$false
and
Get-VM | Start-VM -Confirm:$false
Note that the Shutdown-VMGuest cmdlet does not wait for the guest OS to complete the shutdown !
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi,
Is thi powering off cleanly my VMs ?
And how can I apply this to all VMs from a specific cluster ?
Thx
Yes, this initiates a shutdown through the guest OS.
For a cluster you could do
Get-Cluster -Name <your-clustername> | Get-VM | Shutdown-VMGuest -Confirm:$false
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
And finally is this shutdown my VMs properly ?
Thx very much
Can you give me the same to powerOn my VMs ?
Thx very much
I've found the answer :
Start-VM instead of shutdown-VMguest
Yes, that was 2nd code block in my first reply.
____________
Blog: LucD notes
Twitter: lucd22
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference