posted on January 1st 1970, at 01:00
by lunarg

Occassionally, it may be necessary to perform disk consolidation. If you have a lot of VMs which need consolidation, it can be tedious to do this in the webclient. Fortunately, it's also possible to mass-consolidate via PowerCLI.

Install and log in using PowerCLI.

To show which VM's need consolidation, run:

Get-VM | ? {$_.Extensiondata.Runtime.ConsolidationNeeded}

To actually perform disk consolidation, run:

Get-VM | ? {$_.Extensiondata.Runtime.ConsolidationNeeded} | % {$_.ExtensionData.ConsolidateVMDisks_Task()}