1 Reply Latest reply on Aug 22, 2019 5:50 AM by LucD

    SVMotion and changing disks storage policy

    andvm Enthusiast



      using powercli and Move-VM command I can read the VM name and datastore from csv file and migration works.


      However all disks remain attached to vSAN default storage policy so I need to change this to Datastore default when I migrate.


      How can I achieve this for these VMs? Some of them have multiple disks so need to make sure all disks gets moved to Default datastore policy



        • 1. Re: SVMotion and changing disks storage policy
          LucD Guru
          Community WarriorsvExpertUser Moderators

          Did you try like this?


          $vm = Get-VM -Name MyVM

          $hd = Get-HardDisk -VM $vm

          Get-SpbmEntityConfiguration -VM $vm | Set-SpbmEntityConfiguration -StoragePolicy "NewPolicy" -Confirm:$false

          Get-SpbmEntityConfiguration -HardDisk $hd | Set-SpbmEntityConfiguration -StoragePolicy "NewPolicy" -Confirm:$false