PowerCLI-Example-Scripts
PowerCLI-Example-Scripts copied to clipboard
'Exception calling "Desktop_Update" with "3" argument(s)' when using Start-HVPool on one pool
I'm using VMware.Hv.Helper in an internal script, like so:
Start-HVPool -Recompose -Pool $Pool -LogoffSetting $LogoffSetting -ParentVM $ParentVM -SnapshotVM $Snapshot -StartTime $StartTime -ErrorAction Stop
I have two pools, with the same ParentVM, SnapshotVM, and LogoffSetting, so the only difference in the call is the name of the pool. On one pool, this works fine:
Performing RECOMPOSE on POPSandbox_1
Performed recompose task on Pool: POPSandbox_1
On the other, I get an exception, though the recompose is started:
Performing RECOMPOSE on POPViewTest_1
Start-HVPool : Exception calling "Desktop_Update" with "3" argument(s): "ExceptionType : VMware.Hv.UnexpectedFault
ErrorMessage : Encountered unexpected error during execution
CauseString : java.lang.NullPointerException
CauseStackTrace : System.String[]
ErrorCode :
ErrorAttributes : "
At line:120 char:9
+ Start-HVPool -Recompose -Pool $Pool -LogoffSetting $LogoffSet ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Start-HVPool], MethodInvocationException
+ FullyQualifiedErrorId : VimException,Start-HVPool
As I said, the recompose starts properly. When performing a manual recompose in the View client with the same settings, no errors are observed. Any idea where to begin troubleshooting this?