7 Replies Latest reply on Jan 12, 2018 2:02 AM by LucD

    New-VM in DatastoreCluster with error

    the1960 Novice

      I am creating a new VM with P-CLI. The VM should be stored in a datastore cluster. I get the following error message:

      Script:

       

      PowerCLI C:\> Y:\Skripte\PS+PowerCLI\Test\ExportVC-Info\TestDatastoreCluster.ps1

      DatastoreCluster: Verwaltung

      New-VM : 12.01.2018 08:17:19    New-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 1077

      while parsing property "disk" of static type ArrayOfVirtualMachineRelocateSpecDiskLocator

      while parsing serialized DataObject of type vim.vm.RelocateSpec

      at line 1, column 983

      while parsing property "location" of static type VirtualMachineRelocateSpec

      while parsing serialized DataObject of type vim.vm.CloneSpec

      at line 1, column 972

      while parsing property "cloneSpec" of static type VirtualMachineCloneSpec

      while parsing serialized DataObject of type vim.storageDrs.StoragePlacementSpec

      at line 1, column 277

      while parsing call information for method RecommendDatastores

      at line 1, column 171

      while parsing SOAP body

      at line 1, column 64

      while parsing SOAP envelope

      at line 1, column 0

      while parsing HTTP request for method recommendDatastores

      on object of type vim.StorageResourceManager

      at line 1, column 0    

      At Y:\Skripte\PS+PowerCLI\Test\ExportVC-Info\TestDatastoreCluster.ps1:27 char:5

      +     New-VM -Name $VMName -VMHost $VM_Cluster -Template $NameTemplate -Location $ ...

      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

          + CategoryInfo          : NotSpecified: (:) [New-VM], InvalidRequest

          + FullyQualifiedErrorId : Client20_VmServiceImpl_ApplySdrsRecommendation_ViError,VMware.VimAutomation.ViCore.Cmdlets.Commands.NewVM

       

      -- Output --

      DatastoreCluster: Verwaltung

       

      New-VM : 12.01.2018 08:17:19    New-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 1077

      while parsing property "disk" of static type ArrayOfVirtualMachineRelocateSpecDiskLocator

      while parsing serialized DataObject of type vim.vm.RelocateSpec

      at line 1, column 983

      while parsing property "location" of static type VirtualMachineRelocateSpec

      while parsing serialized DataObject of type vim.vm.CloneSpec

      at line 1, column 972

      while parsing property "cloneSpec" of static type VirtualMachineCloneSpec

      while parsing serialized DataObject of type vim.storageDrs.StoragePlacementSpec

      at line 1, column 277

      while parsing call information for method RecommendDatastores

      at line 1, column 171

      while parsing SOAP body

      at line 1, column 64

      while parsing SOAP envelope

      at line 1, column 0

      while parsing HTTP request for method recommendDatastores

      on object of type vim.StorageResourceManager

      at line 1, column 0    

      At Y:\Skripte\PS+PowerCLI\Test\ExportVC-Info\TestDatastoreCluster.ps1:27 char:5

      +     New-VM -Name $VMName -VMHost $VM_Cluster -Template $NameTemplate -Location $ ...

      + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

          + CategoryInfo          : NotSpecified: (:) [New-VM], InvalidRequest

          + FullyQualifiedErrorId : Client20_VmServiceImpl_ApplySdrsRecommendation_ViError,VMware.VimAutomation.ViCore.Cmdlets.Commands.NewVM

       

      Anone a Idea?