I need to Storage vmotion all vms resident on one datastore to another datastore within the same cluster. All VMS have one vmdk.. has anyone a script or done something similar..
You should also be able to do:
Get-Datastore "OldDatastore" | Get-VM | Foreach { Move-VM -Datastore (Get-Datastore "NewDatastore") }
If you found this information useful, please consider awarding points for Correct or Helpful.
Alan Renouf
I've done this with a powersheel scrippt pretty simply...
Use halr9000's function here:
And wrap it in something like this (pseudocode)
Get-Datastore (Name=whatever) | Get-VM | SVmotion-VM (get-datastore NewDS)
--M
--Matt
VCP, vExpert, Unix Geek
You should also be able to do:
Get-Datastore "OldDatastore" | Get-VM | Foreach { Move-VM -Datastore (Get-Datastore "NewDatastore") }
If you found this information useful, please consider awarding points for Correct or Helpful.
Alan Renouf
^^^^ Alan's way is better
Use his.
--Matt
VCP, vExpert, Unix Geek
Thanks Alan !!!