VMware Horizon Community
vivekrishna
Enthusiast
Enthusiast
Jump to solution

View power cli.

Hi,

I am trying to add a datastore to existing pool using View powercli. While I run this command, I am getting the below error.

Update-AutomaticLinkedClonePool -Pool_id TEST-DATASTORE -DatastoreSpecs [Conservative,data]/Vcenter/host/Workload_Cluster/datastorename;

Cannot convert '[Conservative data]/INKOCCENVDC/host/Workload_Cluster/AV_Writable_02' to the type 'System.String' required by parameter 'DatastoreSpecs'. Specified method is not supported.

    + CategoryInfo          : InvalidArgument: (:) [Update-AutomaticLinkedClonePool], ParameterBindingException

    + FullyQualifiedErrorId : CannotConvertArgument,vmware.view.powershell.cmdlets.UpdateAutomaticLinkedClonePool

-------------------------------------------------------------------------------

Then I tried putting the strings :

-Pool_id TEST-DATASTORE -DatastoreSpecs '[Conservative,data]/Vcenter/host/Workload_Cluster/datastorename;'

Update-AutomaticLinkedClonePool : PowershellService::UpdateAutomaticLinkedClonePool FAILED, error=The provided datastore specs do not include any datastores configured for OS disks.

    + CategoryInfo          : InvalidResult: (vmware.view.pow...LinkedClonePool:UpdateAutomaticLinkedClonePool) [Update-AutomaticLinkedClonePool], Exception

    + FullyQualifiedErrorId : PowershellService::UpdateAutomaticLinkedClonePool FAILED,vmware.view.powershell.cmdlets.UpdateAutomaticLinkedClonePool

May I know why ?

This datastore is used for Data disks already for the other pools.

Please help

0 Kudos
1 Solution

Accepted Solutions
dvandelaar
Enthusiast
Enthusiast
Jump to solution

Hi,

You probably should specify the existing datastore(s) in the pool as well.

Check out the help:

get-help Update-AutomaticLinkedClonePool -Detailed

And it will will tell you:

You must specify at least one datastore for each usage type

The datastores that you specify override the previous setting. You must specify the existing datastores to retain them for use in this pool

This certainly does explain the error on the OS disks: datastore specs do not include any datastores configured for OS disks.

In the code you pasted it is true that there are no OS disks specified and it looks like you also did not specify the existing disk(s) in the pool.

I found a nice example in the docs: Creating and Updating Linked-Clone Desktop Pools

The example shows how to use [conservative,os,data]

Hopefully this helps to solve your issue !

View solution in original post

0 Kudos
2 Replies
dvandelaar
Enthusiast
Enthusiast
Jump to solution

Hi,

You probably should specify the existing datastore(s) in the pool as well.

Check out the help:

get-help Update-AutomaticLinkedClonePool -Detailed

And it will will tell you:

You must specify at least one datastore for each usage type

The datastores that you specify override the previous setting. You must specify the existing datastores to retain them for use in this pool

This certainly does explain the error on the OS disks: datastore specs do not include any datastores configured for OS disks.

In the code you pasted it is true that there are no OS disks specified and it looks like you also did not specify the existing disk(s) in the pool.

I found a nice example in the docs: Creating and Updating Linked-Clone Desktop Pools

The example shows how to use [conservative,os,data]

Hopefully this helps to solve your issue !

0 Kudos
vivekrishna
Enthusiast
Enthusiast
Jump to solution

Thanks, I made the script..

0 Kudos