VMware Cloud Community
pzike
Contributor
Contributor

Error enabling desktop pool 3D renderer with PowerCLI 11.5

I'm updating a script that automates the process of creating new VMs after we upgraded to Horizon 7.10 and some of the PowerCLI commands are no longer recognized. Apparently we need to use VMware.Hv.Helper to replace the lost functionality. I haven't worked with View API or vSphere objects before so this has been a learning experience for me. I'm now stuck on the process of modifying desktop pool settings (we use manual pools), but I'm only having issues enabling the 3D renderer and setting it to Automatic. The command I feel SHOULD be correct based on my research using the View API objects reference is:

Set-HVPool -PoolName $PoolName -Key "desktopSettings.displayProtocolSettings.pcoipDisplaySettings.renderer3D" -Value "AUTOMATIC"

But it gives me this error:

Exception calling "Desktop_Update" with "3" argument(s): "ExceptionType : VMware.Hv.InvalidArgument

ErrorMessage : A null value is invalid.

ParameterName : desktopSettings.displayProtocolSettings.pcoipDisplaySettings.vRamSizeMB"

At C:\Program Files\WindowsPowerShell\Modules\VMware.Hv.Helper\VMware.HV.Helper.psm1:6352 char:8

+        $desktop_helper.Desktop_Update($services,$item,$updates)

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

    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException

    + FullyQualifiedErrorId : VimException

Oddly, it seems to think the property I'm referencing is vRamSizeMB, when it's clearly not. I have no idea why that is. And when I replace desktopSettings with DesktopSettings in the -Key, it reflects the correct property, but of course the command still fails as I would expect it to since the -Key is case-sensitive:

Exception calling "Desktop_Update" with "3" argument(s): "ExceptionType : VMware.Hv.InvalidArgument

ErrorMessage : Invalid member name.

ParameterName : DesktopSettings.displayProtocolSettings.pcoipDisplaySettings.renderer3D"

At C:\Program Files\WindowsPowerShell\Modules\VMware.Hv.Helper\VMware.HV.Helper.psm1:6352 char:8

+        $desktop_helper.Desktop_Update($services,$item,$updates)

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

    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException

    + FullyQualifiedErrorId : VimException

After Googling this error, it mostly seems to come from an incorrect -Key, but after double- triple- and quadruple-checking, I don't know what else the -Key could possibly be to access the renderer3D property. I was able to change several other pool settings just fine using the same process of tracing the properties down through child objects of desktopSettings. Also, interestingly, when I run the command with -WhatIf (because sometimes that gives more info about the error) it acts as if it ran perfectly fine with no errors whatsoever:

What if: Performing the operation "Set-HVPool" on target "STAFFTEST6-X".

I've researched the heck out of this but I still have no idea what I'm doing wrong. I'm probably messing up the -Key somehow but I thought I understood how those work. Any ideas?

Reply
0 Kudos
4 Replies
LucD
Leadership
Leadership

Have you tried with DesktopSettings.DesktopDisplayProtocolSettings.pcoipDisplaySettings.renderer3D


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

Reply
0 Kudos
pzike
Contributor
Contributor

Tried it just now, but no luck. I get the same error.

Reply
0 Kudos
LucD
Leadership
Leadership

It could be a uppercase/lowercase thing as well.
I'll check if I can find the correct Key and spelling


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

Reply
0 Kudos
pzike
Contributor
Contributor

After trying a bunch of different spelling variations (and all failing), I realized that anything but "desktopSettings.displayProtocolSettings.pcoipDisplaySettings.renderer3D" returns an error message of Invalid member name, while running this version returns A null value is invalid. Which leads me to believe that the -Key is in fact correct, and to question what value it's receiving/it thinks it's receiving that is null. Other than -Key, I can confirm it is getting the correct name for -PoolName of type string, which is the only type it will accept, and of the accepted values listed for renderer3D, only "MANAGE_BY_VSPHERE_CLIENT" has succeeded.

I'm forced to look again at the vRamSizeMB in the error line that reads: ParameterName : desktopSettings.displayProtocolSettings.pcoipDisplaySettings.vRamSizeMB" and question why it's there.

The documentation for vRamSizeMB says: This property is required if renderer3D is set to "AUTOMATIC", "SOFTWARE", or "HARDWARE". So I tried changing vRamSizeMB before running the other command, but it doesn't update the property because renderer3D is disabled... but I also can't seem to set renderer3D because there's no vRamSizeMB? There doesn't seem to be a way to set them both at the same time, so I'm feeling like this is some sort of chicken and egg situation.

It's getting really quite frustrating. I'm amazed that it seems no one else has ever tried to do this before.

Reply
0 Kudos