powercliadmin
Contributor
Contributor

Mass-change Horizon Linked-Clone datastores (VMware.Hv.Helper)

Hi guys,

I have a lot of pools and need to migrate all to different datastores. I am trying to change the linked-clones datastores with PowerCLI but with no luck. I am fighting with that from a couple of days and I don have more ideas.

After many tries in looking for proper data to change now I am struggling to change it.

I have to change following values:

 

(Get-HVPool -PoolName $i).AutomatedDesktopData.VirtualCenterNamesData.DatastorePaths
(Get-HVPool -PoolName $i).AutomatedDesktopData.VirtualCenterProvisioningSettings.VirtualCenterStorageSettings.Datastores.StorageOvercommit

 

Finally after hours of researches I tried to use

 

Set-HVPool -poolname $i -spec input.json

 

with following settings in it:

 

{
"base.description" : "updated datastores and storageovercommitsetting",
"AutomatedDesktopData.VirtualCenterNamesData.DatastorePaths" : "datastore01, datastore02", <--- here I was trying different naming convention
"AutomatedDesktopData.VirtualCenterProvisioningSettings.VirtualCenterStorageSettings.Datastores.StorageOvercommit" : "UNBOUNDED, UNBOUNDED"
}

 

 

But look like Set-HVpool doesn't serve this feature or I am doing it wrong.

In a mean time I've checked members of:

 

((Get-HVPool -PoolName $i).AutomatedDesktopData.VirtualCenterNamesData.DatastorePaths) | Get-Member

 

and found nice methods like REPLACE, INSERT, etc. But I don't know how to use them because Set-HVPool cannot pick those methods up.

Now I have no more ideas how to change that. Is it possible at all? Or only manual change in GUI (please no) ;).

Regards,

JJ

 

 

0 Kudos
2 Replies
LucD
Leadership
Leadership

Note that the "keys" are case-sensitive afaik.

For example, AutomatedDesktopData.VirtualCenterNamesData.DatastorePaths should be automatedDesktopData.virtualCenterNamesData.datastorePaths if I'm not mistaken.

 


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
powercliadmin
Contributor
Contributor

Yeah, thanks. That is crazy with this case sensitivness. When I do Get-HVPool those little bastards start from capitals.

Will try to change this as well, maybe this is it, thanks 🙂 

0 Kudos