I am trying to move vms to a new datastore cluster and as part of the move convert them to thin provisioned. As soon as I add the -DiskStorageFormat Thin2GB it throws an error. Am I missing something? I am using PowerCLI 5.1 Release 1 build 793510
Move-VM -VM myVMname -Datastore DatastoreClusterNAME -DiskStorageFormat Thin2GB
Move-VM : 1/18/2013 11:24:44 AM Move-VM
Required property datastore is missing from data object of type VirtualMachineRelocateSpecDiskLocator
while parsing serialized DataObject of type vim.vm.RelocateSpec.DiskLocator
at line 1, column 663 while parsing property "disk" of static type ArrayOfVirtualMachineRelocateSpecDiskLocator
while parsing serialized DataObject of type vim.vm.RelocateSpec
at line 1, column 649
while parsing property "relocateSpec" of static type VirtualMachineRelocateSpec
while parsing serialized DataObject of type vim.storageDrs.StoragePlacementSpec
at line 1, column 324
while parsing call information for method RecommendDatastores
at line 1, column 218
while parsing SOAP body
at line 1, column 207
while parsing SOAP envelope
at line 1, column 38
while parsing HTTP request for method recommendDatastores
on object of type vim.StorageResourceManager
at line 1, column 0
At line:1 char:8
+ Move-VM <<<< -VM myVMname -Datastore DatastoreClusterNAME -DiskStorageFormat Thin2GB + CategoryInfo : NotSpecified: (:) [Move-VM], InvalidRequest + FullyQualifiedErrorId : Client20_VmServiceImpl_RelocateVmThroughSdrs_ViError,VMw are.VimAutomation.ViCore.Cmdlets.Commands.MoveVM
If I leave off the DiskStorageFlag it works fine:
Move-VM -VM myVMname -Datastore DatastoreClusterNAME
Using the same command but specifying an individule datastore in the cluster works fine:
Move-VM -VM myVMname -Datastore DatastoreNAME -DiskStorageFormat Thin2GB