Merge pull request #306 from thibautnoben/master
Added vgpu support to new-hvfarm
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
{
|
||||
"Type": "AUTOMATED",
|
||||
"Data": {
|
||||
"Name": "LCFarmJson",
|
||||
"DisplayName": "FarmJsonTest",
|
||||
"AccessGroup": "Root",
|
||||
"Description": "created LC Farm from PS via JSON with NVIDIA GRID VGPU",
|
||||
"Enabled": null,
|
||||
"Deleting": false,
|
||||
"Settings": {
|
||||
"DisconnectedSessionTimeoutPolicy": "NEVER",
|
||||
"DisconnectedSessionTimeoutMinutes": 1,
|
||||
"EmptySessionTimeoutPolicy": "AFTER",
|
||||
"EmptySessionTimeoutMinutes": 1,
|
||||
"LogoffAfterTimeout": false
|
||||
},
|
||||
"Desktop": null,
|
||||
"DisplayProtocolSettings": {
|
||||
"DefaultDisplayProtocol": "PCOIP",
|
||||
"AllowDisplayProtocolOverride": false,
|
||||
"EnableHTMLAccess": false,
|
||||
"EnableCollaboration": false,
|
||||
"EnableGRIDvGPUs": true,
|
||||
"VGPUGridProfile": "grid_m10-8a"
|
||||
},
|
||||
"ServerErrorThreshold": null,
|
||||
"MirageConfigurationOverrides": {
|
||||
"OverrideGlobalSetting": false,
|
||||
"Enabled": false,
|
||||
"Url": null
|
||||
}
|
||||
},
|
||||
"AutomatedFarmSpec": {
|
||||
"ProvisioningType": "VIEW_COMPOSER",
|
||||
"VirtualCenter": null,
|
||||
"RdsServerNamingSpec": {
|
||||
"NamingMethod": "PATTERN",
|
||||
"PatternNamingSettings": {
|
||||
"NamingPattern": "LCFarmVMPS",
|
||||
"MaxNumberOfRDSServers": 1
|
||||
}
|
||||
},
|
||||
"VirtualCenterProvisioningSettings": {
|
||||
"EnableProvisioning": true,
|
||||
"StopProvisioningOnError": true,
|
||||
"MinReadyVMsOnVComposerMaintenance": 0,
|
||||
"VirtualCenterProvisioningData": {
|
||||
"ParentVm": "RDSServer",
|
||||
"Snapshot": "RDS_SNAP1",
|
||||
"Datacenter": null,
|
||||
"VmFolder": "Praveen",
|
||||
"HostOrCluster": "CS-1",
|
||||
"ResourcePool": "CS-1"
|
||||
},
|
||||
"VirtualCenterStorageSettings": {
|
||||
"Datastores": [
|
||||
{
|
||||
"Datastore": "Datastore1",
|
||||
"StorageOvercommit": "UNBOUNDED"
|
||||
}
|
||||
],
|
||||
"UseVSan": false,
|
||||
"ViewComposerStorageSettings": {
|
||||
"UseSeparateDatastoresReplicaAndOSDisks": false,
|
||||
"ReplicaDiskDatastore": null,
|
||||
"UseNativeSnapshots": false,
|
||||
"SpaceReclamationSettings": {
|
||||
"ReclaimVmDiskSpace": false,
|
||||
"ReclamationThresholdGB": null,
|
||||
"BlackoutTimes": null
|
||||
}
|
||||
}
|
||||
},
|
||||
"VirtualCenterNetworkingSettings": {
|
||||
"Nics": null
|
||||
}
|
||||
},
|
||||
"VirtualCenterManagedCommonSettings": {
|
||||
"TransparentPageSharingScope": "VM"
|
||||
},
|
||||
"CustomizationSettings": {
|
||||
"CustomizationType": "SYS_PREP",
|
||||
"DomainAdministrator": null,
|
||||
"AdContainer": "CN=Computers",
|
||||
"ReusePreExistingAccounts": false,
|
||||
"SysprepCustomizationSettings": {
|
||||
"CustomizationSpec": "PraveenCust"
|
||||
}
|
||||
},
|
||||
"RdsServerMaxSessionsData": {
|
||||
"MaxSessionsType": "UNLIMITED",
|
||||
"MaxSessions": null
|
||||
}
|
||||
},
|
||||
"ManualFarmSpec": null,
|
||||
"NetBiosName": "adviewdev"
|
||||
}
|
||||
@@ -2243,6 +2243,21 @@ function New-HVFarm {
|
||||
[boolean]
|
||||
$EnableHTMLAccess = $false,
|
||||
|
||||
#farmSpec.data.displayProtocolSettings.EnableCollaboration
|
||||
[Parameter(Mandatory = $false)]
|
||||
[boolean]
|
||||
$EnableCollaboration = $false,
|
||||
|
||||
#farmSpec.data.displayProtocolSettings.EnableGRIDvGPUs
|
||||
[Parameter(Mandatory = $false)]
|
||||
[boolean]
|
||||
$EnableGRIDvGPUs = $false,
|
||||
|
||||
#farmSpec.data.displayProtocolSettings.VGPUGridProfile
|
||||
[Parameter(Mandatory = $false)]
|
||||
[string]
|
||||
$VGPUGridProfile,
|
||||
|
||||
#farmSpec.data.serverErrorThreshold
|
||||
[Parameter(Mandatory = $false)]
|
||||
[ValidateRange(0,[Int]::MaxValue)]
|
||||
@@ -2659,6 +2674,12 @@ function New-HVFarm {
|
||||
$defaultDisplayProtocol = $jsonObject.Data.DisplayProtocolSettings.DefaultDisplayProtocol
|
||||
$allowDisplayProtocolOverride = $jsonObject.Data.DisplayProtocolSettings.AllowDisplayProtocolOverride
|
||||
$enableHTMLAccess = $jsonObject.Data.DisplayProtocolSettings.EnableHTMLAccess
|
||||
$EnableCollaboration = $jsonObject.Data.DisplayProtocolSettings.EnableCollaboration
|
||||
|
||||
if ($null -ne $jsonObject.Data.DisplayProtocolSettings.VGPUGridProfile) {
|
||||
$EnableGRIDvGPUs = $jsonObject.Data.DisplayProtocolSettings.EnableGRIDvGPUs
|
||||
$VGPUGridProfile = $jsonObject.Data.DisplayProtocolSettings.VGPUGridProfile
|
||||
}
|
||||
}
|
||||
if ($null -ne $jsonObject.Data.serverErrorThreshold) {
|
||||
$serverErrorThreshold = $jsonObject.Data.serverErrorThreshold
|
||||
@@ -2802,6 +2823,11 @@ function New-HVFarm {
|
||||
$farmData.DisplayProtocolSettings.DefaultDisplayProtocol = $defaultDisplayProtocol
|
||||
$farmData.DisplayProtocolSettings.AllowDisplayProtocolOverride = $AllowDisplayProtocolOverride
|
||||
$farmData.DisplayProtocolSettings.EnableHTMLAccess = $enableHTMLAccess
|
||||
$farmData.DisplayProtocolSettings.EnableCollaboration = $EnableCollaboration
|
||||
if($VGPUGridProfile -ne $false){
|
||||
$farmData.DisplayProtocolSettings.EnableGRIDvGPUs = $EnableGRIDvGPUs
|
||||
$farmData.DisplayProtocolSettings.VGPUGridProfile = $VGPUGridProfile
|
||||
}
|
||||
}
|
||||
if ($farmData.MirageConfigurationOverrides){
|
||||
$farmData.MirageConfigurationOverrides.OverrideGlobalSetting = $overrideGlobalSetting
|
||||
|
||||
Reference in New Issue
Block a user