Is there something I'm missing to the JSON spec for creating RDS farms with VMware.Hv.Helper?
When I used the JSON template I keep getting this error message:
PS C:\scripts\Powershell-Horizon> New-HVFarm -Spec .\RDS.json
Exception calling "Farm_Create" with "2" argument(s): "ExceptionType : VMware.Hv.EntityNotFound
ErrorMessage : Datastore not found in Desktop's HostOrCluster
Id : VMware.Hv.DatastoreId"
At C:\Program Files\WindowsPowerShell\Modules\VMware.Hv.Helper\VMware.HV.Helper.psm1:2693 char:7
+ $Id = $farm_service_helper.Farm_Create($services, $farmSpecObj)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : VimException
Type Data AutomatedFarmSpec ManualFarmSpec
---- ---- ----------------- --------------
AUTOMATED VMware.Hv.FarmData VMware.Hv.FarmAutomatedFarmSpec
I've verified several times the datastore is there, is named right, and is functioning correctly. Am I missing something?
Here's my spec for reference:
{
"Type": "AUTOMATED",
"Data": {
"Name": "RDSI",
"DisplayName": "RDSI",
"AccessGroup": "Root",
"Description": "Created by PowerCLI",
"Enabled": null,
"Deleting": false,
"Settings": {
"DisconnectedSessionTimeoutPolicy" : "NEVER",
"DisconnectedSessionTimeoutMinutes" : 1,
"EmptySessionTimeoutPolicy" : "AFTER",
"EmptySessionTimeoutMinutes" : 1,
"LogoffAfterTimeout" : false
},
"Desktop": null,
"DisplayProtocolSettings": {
"DefaultDisplayProtocol" : "BLAST",
"AllowDisplayProtocolOverride" : false,
"EnableHTMLAccess" : true
},
"ServerErrorThreshold": null,
"MirageConfigurationOverrides": {
"OverrideGlobalSetting" : false,
"Enabled" : false,
"Url" : null
}
},
"AutomatedFarmSpec": {
"ProvisioningType": "INSTANT_CLONE_ENGINE",
"VirtualCenter": null,
"RdsServerNamingSpec": {
"NamingMethod": "PATTERN",
"PatternNamingSettings": {
"NamingPattern": "RDSI-IC-{n:fixed=2}",
"MaxNumberOfRDSServers": 1
}
},
"VirtualCenterProvisioningSettings": {
"EnableProvisioning": true,
"StopProvisioningOnError": true,
"MinReadyVMsOnVComposerMaintenance": 0,
"VirtualCenterProvisioningData": {
"ParentVm": "W16-Gold",
"Snapshot": "H74-IC",
"Datacenter": "Lab",
"VmFolder": "Lab",
"HostOrCluster": "Cluster",
"ResourcePool": "Cluster"
},
"VirtualCenterStorageSettings": {
"Datastores": [
{
"Datastore": "SSD",
"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": "CLONE_PREP",
"DomainAdministrator": null,
"AdContainer": "OU=Clones",
"ReusePreExistingAccounts": false,
"ClonePrepCustomizationSettings": {
"InstantCloneEngineDomainAdministrator": "administrator@jackmac.net",
"PowerOffScriptName": null,
"PowerOffScriptParameters": null,
"PostSynchronizationScriptName": null,
"PostSynchronizationScriptParameters": null
}
},
"RdsServerMaxSessionsData": {
"MaxSessionsType": "UNLIMITED",
"MaxSessions": null
}
},
"ManualFarmSpec": null,
"NetBiosName" : "JACKMAC"
}
What happens when you use, instead of the JSON spec file, (only) the (required) parameters on the cmdlet, including -HostOrCluster (with value 'Cluster') and -Datastores (with value 'SSD')?
Do you get the same error?
You can always open an Issue on the repo.
<rantmode>
On the other hand the VMware.HV.Helper module is one of the worst examples of placing something in Open Source I have seen.
Imho, one can't just put +/- 10000 lines of code in Open Source without any further explanation of the logic or some verbosity.
And I'm not even going to mention the integration with PowerCLI and PowerShell :smileyshocked:
Anyone who wants to contribute needs to delve through these 10000 lines of code, and in the mean time learn the Horizon API by hearth.
And that API is not over-documented either
</rantmode>
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Good call on the troubleshooting step, but it did yield the same result...still trying to figure out what it doesn't like about the datastores...
PS C:\scripts\Powershell-Horizon> New-HVFarm -InstantClone
cmdlet New-HVFarm at command pipeline position 1
Supply values for the following parameters:
FarmName: RDSI
ParentVM: W16-Gold
SnapshotVM: H74-IC
VmFolder: Lab
HostOrCluster: Cluster
ResourcePool: Cluster
Datastores[0]: SSD
Datastores[1]:
NetBiosName: JACKMAC
Exception calling "Farm_Create" with "2" argument(s): "ExceptionType : VMware.Hv.EntityNotFound
ErrorMessage : Datastore not found in Desktop's HostOrCluster
Id : VMware.Hv.DatastoreId"
At C:\Program Files\WindowsPowerShell\Modules\VMware.Hv.Helper\VMware.HV.Helper.psm1:2693 char:7
+ $Id = $farm_service_helper.Farm_Create($services, $farmSpecObj)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : VimException
Type Data AutomatedFarmSpec ManualFarmSpec
---- ---- ----------------- --------------
AUTOMATED VMware.Hv.FarmData VMware.Hv.FarmAutomatedFarmSpec