2 Replies Latest reply on Jul 27, 2020 11:37 AM by vivekrishna

    View power cli.

    vivekrishna Novice



      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

        • 1. Re: View power cli.
          dvandelaar Novice


          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 !

          • 2. Re: View power cli.
            vivekrishna Novice

            Thanks, I made the script..