Local host cache, within XenApp and XenDesktop, utilizes a local DB to store configuration information. This local DB is continuously updated by the master SQL DB. When connectivity to the SQL DB fails, the controller automatically switches to the local DB. When the link to the SQL DB is restored, the controller automatically switches back.
Local host cache allows users to make new connections to published apps and desktops. However, local host cache can’t replace all functionality of the master SQL DB. For instance, power options (starting and stopping VMs) are not available. This can be a concern for implementations that rely on pooled desktops (desktop that is temporarily assigned to a user. When the session ends, the desktops is rebooted and is available for any other user).
The power options for a pooled desktop is the problem with local host cache. In the default behavior with local host cache, when a user logs off, the pooled desktop goes into maintenance mode. It is now unavailable for any other user.
If the outage only lasts a short amount of time, this isn’t much of a concern. But if the outage lasts hours, or an entire day, we could potentially run out of powered on VMs.
Now, because I said this is the default behavior it should make you believe that there is an alternative. And there is.
The differences are:
- Maintenance Mode: The VM does not go into maintenance mode
- Reboot: The VM is not rebooted
- Availability: The VM is immediately available for another user
- Tainted: The VM is tainted or dirty. The user does not get a clean machine, because that only happens with a reboot. There is the possibility that some data or configs were left behind from the previous user. Because of this, it is probably wise to not enable this for every desktop group, especially not for groups dealing with very sensitive data.
To enable this, we need to use PowerShell.
Set-BrokerSite -ReuseMachinesWithoutShutdownInOutageAllowed $true Set-BrokerDesktopGroup -Name "desktop_group_name" -ReuseMachinesWithoutShutdownInOutage $true
To make this work, you have to enable it in 2 places:
- The entire site. This is the Set-BrokerSite line
- The desktop group. This is the Set-BrokerDesktopGroup line. It uses the parameter ReuseMachinesWithoutShutdownInOutage, which is only used when in local host cache mode. It does not impact the ShutdownDesktopsAfterUse parameter.
Daniel (Follow on Twitter @djfeller)
Citrix Workspace Poster
XenApp/XenDesktop On-Prem Poster
XenApp/XenDesktop Cloud Service Poster
And this works fine with Cloud Connector as well.
LikeLike
Does this also mean that local host cache feature is or will be officially supported using pooled desktops? Docs still stays the following:
“Local Host Cache is supported for server-hosted applications and desktops, and static (assigned) desktops; it is not supported for pooled VDI desktops (created by MCS or PVS).”
I’m very curious because this will be a great additon (with some limitations taken in regard).
LikeLike
That is strange about the not being supported. I did see that quote in the doc for 7.15, which I believe was the release that added this capability. However, 7.16 and on no longer carries that unsupported quote.
LikeLike
Will this only works when DB outage happens
?
What happens to “ShutdownAfterUse” when set it to true ??
LikeLike
ShutdownAfterUse works when you have access to the DB. When you go into local host cache mode, it uses the ReuseMachinesWithoutShutdownInOutage parameter
LikeLike
Daniel, you are really incredible to bring this up. Absolutely great stuff. Allows us to reconsider a global single site design. Thanks. The only concern still could be Citrix support as this article here seems to be quite current (July 23rd): https://docs.citrix.com/en-us/xenapp-and-xendesktop/service/manage-deployment/local-host-cache.html.
LikeLike