Quantcast
Channel: VMware Communities : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 180460

Validate free space on destination datastore

$
0
0

Hi,

 

Please help me, how can I validate the free space on the destination datastore before I start the storage vmotion on the VM

 

$source = "DS03"

$destin = "DS39"

 

Get-Datastore $source | Get-VM -PipelineVariable vm |

ForEach-Object -Process {

   $task = Move-VM -VM $vm -Datastore $destin -RunAsync

   while ($task.PercentComplete -ne 100)

   {

  sleep 5

   $task = Get-Task -Id $task.Id

   $sProg = @{

     Activity = "$vm Storage vMotion from $source to $destin"

     Status = "$($task.PercentComplete)%"

     PercentComplete = ([int]($task.PercentComplete))

   }

   Write-Progress @sProg

   }

}


Viewing all articles
Browse latest Browse all 180460

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>