Backtrack:  
 
by lunarg on May 14th 2020, at 12:20

You can force-trigger storage DRS recommendations (and possible subsequent storage vMotions) through PowerCLI.

Run the snippet below, replacing the value of $dscName to match the name of the datastore cluster you wish to trigger the DRS recommendation on:

$dscName = 'DatastoreCluster1'
$dsc = Get-View -ViewType StoragePod -Filter @{'Name'=$dscName}
$si = Get-View ServiceInstance
$storMgr = Get-View -Id $si.Content.StorageResourceManager
$storMgr.RefreshStorageDrsRecommendation($dsc.MoRef)
$dsc.UpdateViewData()
if($dsc.PodStorageDrsEntry.Recommendation){
    $dsc.PodStorageDrsEntry.Recommendation | %{
        $storMgr.ApplyStorageDrsRecommendationToPod_Task($dsc.MoRef,$_.Key)
    }
}
 
 
« November 2024»
SunMonTueWedThuFriSat
     12
3456789
10111213141516
17181920212223
24252627282930
 
Links
 
Quote
« When a bird does poo poo in your eye, be happy elephants don't fly. »