Skip to content

Commit 524b0aa

Browse files
authored
Merge pull request #619 from Geo-Ron/new-hvpool-gpu-changes
VMWare.HV.Helper - New-HVPool: implemented vGPU profile for instant clones
2 parents d70d246 + cd502a5 commit 524b0aa

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

Modules/VMware.Hv.Helper/VMware.HV.Helper.psm1

+21-2
Original file line numberDiff line numberDiff line change
@@ -3925,18 +3925,26 @@ function New-HVPool {
39253925
[boolean]$enableHTMLAccess = $false,
39263926

39273927
# DesktopPCoIPDisplaySettings
3928-
#desktopSpec.desktopSettings.logoffSettings.pcoipDisplaySettings.renderer3D
3928+
#desktopSpec.desktopSettings.DisplayProtocolSettings.pcoipDisplaySettings.renderer3D
39293929
[Parameter(Mandatory = $false,ParameterSetName = 'INSTANT_CLONE')]
39303930
[Parameter(Mandatory = $false,ParameterSetName = "LINKED_CLONE")]
39313931
[Parameter(Mandatory = $false,ParameterSetName = 'MANUAL')]
39323932
[ValidateSet('MANAGE_BY_VSPHERE_CLIENT', 'AUTOMATIC', 'SOFTWARE', 'HARDWARE', 'DISABLED')]
39333933
[string]$renderer3D = 'DISABLED',
39343934

3935-
#desktopSpec.desktopSettings.logoffSettings.pcoipDisplaySettings.enableGRIDvGPUs
3935+
#desktopSpec.desktopSettings.DisplayProtocolSettings.pcoipDisplaySettings.enableGRIDvGPUs
39363936
[Parameter(Mandatory = $false,ParameterSetName = "LINKED_CLONE")]
39373937
[Parameter(Mandatory = $false,ParameterSetName = 'MANUAL')]
3938+
[Parameter(Mandatory = $false,ParameterSetName = 'INSTANT_CLONE')]
39383939
[boolean]$enableGRIDvGPUs = $false,
39393940

3941+
#desktopSpec.desktopSettings.DisplayProtocolSettings.pcoipDisplaySettings.VGPUGridProfile
3942+
[Parameter(Mandatory = $false,ParameterSetName = "LINKED_CLONE")]
3943+
# [Parameter(Mandatory = $false,ParameterSetName = 'MANUAL')]
3944+
[Parameter(Mandatory = $false,ParameterSetName = 'INSTANT_CLONE')]
3945+
[ValidateSet('grid_m10-0b','grid_m10-1b','grid_m10-2b','grid_m10-0q','grid_m10-1q','grid_m10-2q','grid_m10-4q','grid_m10-8q')]
3946+
[string]$VGPUGridProfile = $null,
3947+
39403948
#desktopSpec.desktopSettings.logoffSettings.pcoipDisplaySettings.vRamSizeMB
39413949
[Parameter(Mandatory = $false,ParameterSetName = "LINKED_CLONE")]
39423950
[ValidateRange(64,512)]
@@ -4658,6 +4666,7 @@ function New-HVPool {
46584666
if ($null -ne $jsonObject.DesktopSettings.displayProtocolSettings.pcoipDisplaySettings) {
46594667
$renderer3D = $jsonObject.DesktopSettings.displayProtocolSettings.pcoipDisplaySettings.renderer3D
46604668
$enableGRIDvGPUs = $jsonObject.DesktopSettings.displayProtocolSettings.pcoipDisplaySettings.enableGRIDvGPUs
4669+
$VGPUGridProfile = $jsonObject.DesktopSettings.DisplayProtocolSettings.PcoipDisplaySettings.VGPUGridProfile
46614670
if ($jsonObject.DesktopSettings.displayProtocolSettings.pcoipDisplaySettings.vRamSizeMB) {
46624671
$vRamSizeMB = $jsonObject.DesktopSettings.displayProtocolSettings.pcoipDisplaySettings.vRamSizeMB
46634672
}
@@ -4981,6 +4990,16 @@ function New-HVPool {
49814990
$desktopPCoIPDisplaySettings.setRenderer3D($renderer3D)
49824991
#setEnableGRIDvGPUs is not exists, because this property cannot be updated.
49834992
$desktopPCoIPDisplaySettings.getDataObject().EnableGRIDvGPUs = $enableGRIDvGPUs
4993+
if ($enableGRIDvGPUs -eq $true -and $renderer3D -ne 'MANAGE_BY_VSPHERE_CLIENT' -and $InstantClone -eq $true) {
4994+
Write-Error "Enabling GRID support requires that 3D rendering be managed by the vSphere client"
4995+
break
4996+
}
4997+
if ($enableGRIDvGPUs -eq $true -and [string]::IsNullOrEmpty($VGPUGridProfile) -eq $true -and $InstantClone -ne $true) {
4998+
Write-Error "Enabling GRID support for Instant clones, this requires a specified VGPUGridProfile"
4999+
break
5000+
} else {
5001+
$desktopPCoIPDisplaySettings.getDataObject().VGPUGridProfile = $VGPUGridProfile
5002+
}
49845003
$desktopPCoIPDisplaySettings.setVRamSizeMB($vRamSizeMB)
49855004
$desktopPCoIPDisplaySettings.setMaxNumberOfMonitors($maxNumberOfMonitors)
49865005
$desktopPCoIPDisplaySettings.setMaxResolutionOfAnyOneMonitor($maxResolutionOfAnyOneMonitor)

0 commit comments

Comments
 (0)