I had a project where the customer wanted everything converted from thin to thick lazyZero. Of course I wanted to do this automatically. Here are a few things to know:
- Changing the disk type requires you move the disk between luns so it helps to have a go between
- If you convert EagerZero into thin it will still take up the whole disk
The name of the disk types in powerCLi are different
- Thin = thin provisioned
- Thick = lazy zero thick
- EagerZeroedThick = Eager Zeroed Thick
So here are the commands in powerCli
Move-VM $VM -Datastore $destDS -DiskStorageFormat $disktype
Just replace the following items
- $VM with name of virtual machine
- $destDS with destination datastore name
- $disktype with disk type
So the whole process for hundreds of VM’s would be this
- Check destination disk format fits what you want to change from
- Check for snapshots
- Check for RDM
- Move disk to temp storage lun and change format
- Move disk back to original datastore and keep changed format
- Rinse and repeat
Enjoy.