Desktop Not Being Deleted from the Delivery Group

Desktop Not Being Deleted from the Delivery Group

book

Article ID: CTX225376

calendar_today

Updated On:

Description

Objects not deleting from Citrix Studio (XenDesktop 7.6) after deleting in Unidesk (2.9.6.3) via the UMC.

Resolution

Allow the desktop to be automatically added to the broker pool during the desktop creation process, instead of manually adding the desktop.

Problem Cause

The desktops are not being deleted from the delivery group, due to not being automatically added to the group. The below error is seen in the broker log file, in particular the entry, "Machine is already allocated".

00:01:33 ERROR 19 XenUtil: Can't add machine: CmdletInvocationException 'Citrix.XDPowerShell.Broker.MachineAlreadyAllocated,Citrix.Broker.Admin.SDK.NewBrokerMachineCommand' 'Citrix.Broker.Admin.SDK.SdkOperationException: Machine is already allocated ---> System.InvalidOperationException: Machine is already allocated
   --- End of inner exception stack trace ---
   at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)'

This indicates our automated process of adding a desktop to the broker pool failed at one point and it was manually added. We are unable to delete the desktop, set or clear maintenance mode or get desktop ownership.