Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deleteOrRefreshMachineAfterLogoff can only be set for floating user assignment #606

Open
BHB3805 opened this issue Mar 15, 2023 · 1 comment
Labels

Comments

@BHB3805
Copy link

BHB3805 commented Mar 15, 2023

Describe the bug

Exception calling "Desktop_Create" with "2" argument(s): "ExceptionType : VMware.Hv.InvalidArgument
ErrorMessage : deleteOrRefreshMachineAfterLogoff can only be set for floating user assignment
ParameterName : desktopSettings.logoffSettings.deleteOrRefreshMachineAfterLogoff"
At C:\Program Files\WindowsPowerShell\Modules\TEMP\PowerCLI-Example-Scripts-master\Modules\VMware.Hv.Helper\VMware.HV.Helper.psm1:4986 char:7

  •   $id = $desktop_helper.Desktop_create($services,$desktopSpecObj)
    
  •   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    • FullyQualifiedErrorId : VimException

Reproduction steps

I am trying to utilize the New-HVPool command to create a new Instant Clone desktop pool.
I'm using the following script


$Cred = Get-Credential
$HVServer = "a02pvw01.bhbank.net"
$Vcenter = "a02pvc02.bhbank.net"
$datacenter = "A02-PDC"
$datastores = "/A02-PDC/host/VDI/VDI_DS051"
$DomainAdmin = "svc-icops01"
$HostOrCluster = "/A02-PDC/host/VDI"
$ResourcePool = "/A02-PDC/host/VDI/Resources"
$NetBiosName = "BHBANK"
$ParentVM = "W10IMG06-IC"
$SnapshotVM = "W10IMG06-IC-V23.02"
$NewPoolName = "B90-VDP-IC"
$PoolDisplayName = "B90-Mongolia (IC)"
$ProvTime = "UP_FRONT"
$VmFolder = "/A02-PDC/vm/Virtual Desktops"
$MinimumCount = 1
$MaximumCount = 4
$SpareCount = 1
$NumUnassignedMachinesKeptPoweredOn = 1
$AdContainer = "OU=Instant Clones,OU=BHHorizonDesktops"
$NamingPattern = "B90VDIC{n:fixed=2}" # for example
$UserAssignment = "DEDICATED" # or DEDICATED
$AutomaticAssignment = $false # or $false
$allowUsersToResetMachines = $false # or $true
$AllowMultipleSessionsPerUser = $false # or $true
$deleteOrRefreshMachineAfterLogoff = "NEVER" # DELETE or NEVER -lof
$RefreshOsDiskAfterLogoff = "NEVER"
$supportedDisplayProtocols = "BLAST","PCOIP"
$renderer3D = "DISABLED"
$enableGRIDvGPUs = $false
$maxNumberOfMonitors = 2
$maxResolutionOfAnyOneMonitor = "WUXGA"
$quality = "NO_CONTROL" #or HIGH LOW MEDIUM
$throttling = "DISABLED" #or AGGRESIVE CONSERVATIVE DISABLED MODERATE
$overrideGlobalSetting = $false # or $true
$UseSeparateDatastoresReplicaAndOSDisks = $false # or $true
$UseViewStorageAccelerator = $false # or $true
$EnableProvisioning = $true # or $false
$NamingMethod = "PATTERN"
$ReclaimVmDiskSpace = $false # or $true
$RedirectWindowsProfile = $false # or $true
$StopOnProvisioningError = $true # or $true
$StorageOvercommit = "UNBOUNDED"
$UseNativeSnapshots = $false # or $true
$UseSeparateDatastoresPersistentAndOSDisks = $false # or $true
$UseVSAN = $false # or $false
$enableHTMLAccess = $true # or $false
$defaultDisplayProtocol = "PCOIP"
$AutomaticLogoffMinutes = 480
$allowUsersToChooseProtocol = $false
$AutomaticLogoffPolicy = "AFTER" #IMMEDIATELY or NEVER
$postsyncscript = ""
$postsyncpara = ""
Connect-HVServer -Server $HVServer -Credential $Cred
New-HVPool -instantclone -Datastores $Datastores -HostOrCluster $HostOrCluster -NamingMethod $NamingMethod -NetBiosName $NetBiosName -ParentVM $ParentVM -PoolName $NewPoolName -ResourcePool $ResourcePool -SnapshotVM $SnapshotVM -UserAssignment $UserAssignment -VmFolder $VmFolder -AdContainer $AdContainer -AutomaticAssignment $AutomaticAssignment -datacenter $datacenter -DomainAdmin $DomainAdmin -Enable $true -EnableProvisioning $EnableProvisioning -MaximumCount $MaximumCount -MinimumCount $MinimumCount -NamingPattern $NamingPattern -NumUnassignedMachinesKeptPoweredOn $NumUnassignedMachinesKeptPoweredOn -PoolDisplayName $PoolDisplayName -ProvisioningTime $ProvTime -ReclaimVmDiskSpace $ReclaimVmDiskSpace -RedirectWindowsProfile $RedirectWindowsProfile -SpareCount $SpareCount -StopProvisioningOnError $true -StorageOvercommit $StorageOvercommit -UseNativeSnapshots $UseNativeSnapshots -UseSeparateDatastoresReplicaAndOSDisks $UseSeparateDatastoresReplicaAndOSDisks -UseVSAN $UseVSAN -Vcenter $Vcenter -enableHTMLAccess $enableHTMLAccess -defaultDisplayProtocol $defaultDisplayProtocol -AutomaticLogoffMinutes $AutomaticLogoffMinutes -allowUsersToChooseProtocol $allowUsersToChooseProtocol -AutomaticLogoffPolicy $AutomaticLogoffPolicy -PostSynchronizationScriptParameters $postsyncpara -PostSynchronizationScriptName $postsyncscript

The command fails - deleteOrRefreshMachineAfterLogoff can only be set for floating user assignment

There is no issue creating the pool is the Horizon Administrator GUI.

Expected behavior

Creation of new pool.

Additional context

No response

@BHB3805 BHB3805 added the bug label Mar 15, 2023
@gerguk
Copy link

gerguk commented Jun 16, 2023

This looks like a duplicate of #377 where you are creating a dedicated pool. There are no issues when creating a floating pool. Can we get the these merged and addressed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants