Hello,
I am struggling w/ this for some time. I have tried many code snippets but I seem to be in a catch 22. My goal is to:
Move a VM from a standalone DS (DS-standalone-1) to a new Data Store Cluster (DSC-Silver) AND at the same time convert the Hard disk on that Vm from thick lazy zero to eagerzeroedthick..
I have used "move-vm" and/or "move-hardisk" cmdlets in many test one-liners, but I cannot get the proper cmd combination do to both in one shot
Example-1:
>> move-vm mytestvm -datastore dscluster-vmfarm2.2-silver -diskstorageformat 'EagerZeroedThick'
This cmd errors off with "property datastore is missing from data object of type VirtualMachineRelocateSpecDiskLocator using serialized DataObject of type vim.vm.RelocateSpec.DiskLocator"
I have no idea what this means or how to fix it.
Example-2:
move-vm mytestvm -datastore Datastore-VMFarm2.2-FC-R5-06 -diskstorageformat 'EagerZeroedThick'
This cmd works - performing BOTH a move AND a convert - BUT I am forced to specific a SPECIFIC DS within the Cluster - thus defeating the purpose of just dropping it into a cluster and let DRS manage it. I NEED to point it to just the DS Cluster.
Example-3:
Get-HardDisk mytestvm | Move-HardDisk -Datastore Datastore-VMFarm2.2-FC-R5-01 -StorageFormat EagerZeroedThick
This cmd works also BUT AGAIN i must specify a specific DS - where I just want to drop it into Silver.
What am I missing? Basically I want to do the same exact sequence that I do when I choose the UI:
r-click vm> Migrate > Change DS > Select virtual disk format to: eager zeroed > Select DSC-Silver > Finish
Also, when I do get a conversion to work (w/out doing a "move" cmdlet and then I go back to the UI (edit settings) to check what the disk drive reports as it still reports "thick lazy" even though I even used vmkfstools to convert it to eagerzero. I cannot seem to find the correct sequence of commands to work. And I cannot use vmkfstools toconvert if the vm is running - and we do not have ability to power off VMs.
I appreciate any guidance. Stumped.
cheers,
Damon