Skip to content

Category: Blog

Citrix Studio: Database has not been configured for the Citrix Machine Creation Service service.

The Problem

At a customer site we were experiencing a problem where we are unable to open Citrix Studio. Citrix Studio reported the error ‘Reenter the controller address or enter a new address‘ and ‘all services have not been configured‘. Looking in to the error log it seems that an upgrade of the Citrix database has failed, but we did not do any update of Citrix.

Since we do not login to the DDC every day and the use of Studio is not a daily thing, this error could have been there for a while. We were not able to find a cause of this error directly.

The error log shows the following. The full output is available here.

Reset-ProvEnabledFeatureList -AdminAddress “customersite.local:80” -BearerToken ********

Reset-ProvEnabledFeatureList : The operation could not be completed as the database has not been configured for the Citrix Machine Creation Service service.

Citrix.XDPowerShell.Status.DatabaseNotConfigured,Citrix.MachineCreation.Sdk.FeatureChecks.Commands.ResetProvEnabledFeatureListCommand

StackTrace: Citrix.Orchestration.Base.LogicModels.Exceptions.InvalidServiceConfigurationException All services have not been configured.

StackTrace: System.InvalidOperationException The operation could not be completed as the database has not been configured for the Citrix Machine Creation Service service.

at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)

This is a customer site with a single Citrix Delivery Controller on version 1912 CU2 and is also running other Citrix services like Storefront, Director, Licensing and has a local Microsoft SQL Express database. The Server OS is Windows Server 2019 1809 17763.1935.

We could not find a way to fix this issue without installing a new Delivery Controller. We created a Citrix case and they could not find the exact cause of this issue and they recommended us to recreate the environment with a new database. We saw no other choice to do so, but after a while the same error returned on a clean install. A new Citrix case was created..

The Research

Citrix support first tried to recreate the database connection strings without any luck. To do this, they pointed to this Citrix article with a few powershell scripts. This article and scripts can be a great help when resetting the connection strings or moving to a new database location.

At first, Citrix support pointed to a problem within the SQL database because of an ‘Monitor.GetSchemaVersion: Could not find stored procedure ‘Monitor.GetSchemaVersion’‘ when testing the database connections. This was a false positive we also found at other customer sites.

The CDF trace pointed us to the following error, which also suggested that there was a problem with the SQL database

13632,2,2021/07/28 15:29:49:47119,16044,16388,Unknown,-1,Xendesktop Management Console,,0,,1,Error,”DatabaseUpgradeTask(482): Upgrade database analysis error: Citrix.Orchestration.Base.LogicModels.Exceptions.ScriptException: Database connection not set.

18418,2,2021/07/28 15:29:49:92234,20400,4272,Citrix.MachineCreation.exe,0,MachineCreationDAL,,0,,1,Error,”[TID:dcda976b-efa7-11eb-8175-0f695eca111d]The database for the service is not configured.”,””

We looked futher in to the SQL database and concluded that it was working fine. The stored procedure was OK and the database seemed to working fine. Restoring a backup of the database from way before the issue occurred, did not solve the problem. We gatherd more CDF traces and ProcMon traces and after a lot of research from Citrix Support we came to a conclusion which solved this error and the Citrix case.

Not sure if it was caused by changes during research but Citrix Director also began showing errors and now we are unable to manage the environment using Studio and Director.

Your logon attempt was unsuccessful.

Username: ‘xxx’

Domain: ‘xxxx’

Additional information:

Xen Desktop Controllers is running an incompatible version of the software. For assistance, contact your administrator.

The Solution

Citrix Support reviewed the logs and found an issue with the performance counter that is causing this issue with Citrix Studio and Citrix Director:

2341,1,2021/10/01 13:57:36:72314,13396,2748,Citrix.MachineCreation.exe,0,MachineCreationDAL,,0,,1,Error,”ERROR: DALRuntime: Performance counter initialization failed: System.InvalidOperationException: The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly.

2502,3,2021/10/01 13:57:38:25555,13396,2748,Citrix.MachineCreation.exe,0,MachineCreationLog,,0,,1,Error,”Exception thrown Starting DAL: System.InvalidOperationException: The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly.

In the above logs the DAL stands for data access layer, which is our SQL access layer. This failure of the performance counter is causing the failure in initialization of the DAL and hence we see the Database configuration error.

I ran the following commands on request of Citrix support and Citrix Studio and Director were up and running again:

unlodctr “Windows Workflow Foundation 4.0.0.0”
lodctr C:\Windows\INF\Windows Workflow Foundation 4.0.0.0\PerfCounters.ini

unlodctr “.NET Data Provider for SqlServer”
lodctr C:\Windows\INF\.NET Data Provider for SqlServer\_dataperfcounters_shared12_neutral.ini

unlodctr “.NETFramework
lodctr C:\Windows\INF\.NETFramework\corperfmonsymbols.ini

We did not find a root cause of the performance counter issue but this solved the error in Citrix Studio for us. The error that was shown was caused by an issue with one of the above performance counters and could have been caused by a software install or (Windows) update.

Leave a Comment

Azure Bastion – RDP and SSH to Azure

Azure Bastion is a new Azure service that enables you to create private RDP and SSH to Azure machines. Before Azure Bastion, you would have to create VPN access to Azure or assign a public IP address to the virtual machine(s) and allow RDP/SSH access from the internet.
Before Azure Bastion you could secure the access to the virtual machine using Just In Time VM Access or a VPN. Bastion gives you a full private service in your Azure virtual network so you can access your machines using SSL in the browser without the need to expose your machines.

Azure Bastion is currently in preview. You can access the preview using this URL : https://aka.ms/BastionHost.

Azure Bastion architecture

How Azure Bastion Works

The Azure Bastion service works over port 443 (SSL) and this is the only port and connection Bastion uses. So port 443 will be the only port that you will have to enable in your virtual network (NSG). Behind Bastion it will connect to your devices over port 3389 (RDP) or 22 (SSH) to the virtual machines.

Alternative to Azure Bastion, you could work with a VPN service to Azure, IP access (with whitelisting) or Just In Time VM Access.

Click the READ MORE button to start going though the actual configuration

Leave a Comment

My home lab setup

My current homelab in ESXi

The last few days I have been busy with creating my new home lab. For years I had the possibility to use my employers or customers test/lab environments, to test new technology and reproduce/troubleshoot issues. I have started working as a freelancer earlier this year and needed my own test environment.

Why a home lab

For me, I use my home lab almost daily. To try and reproduce customer issues and verify their setup or to setup and test new software/settings but most of all to study and gain/improve my knowledge and get my certifications. I will combine my home lab with an Azure environment.

My gear of choice

I want my lab environment to be available 24/7 with low power consumption and I want it to be (very) quiet. I also wanted it to have a dedicated GPU. I did not want to build my own custom computer (takes to much time for me) so I wanted a pre-build computer. Intel offers a large choice of pre-build hardware with good specs!

I have chosen to buy the Intel NUC Hades Canyon. The Hades Canyon offers a good dedicated GPU, fast CPU, M.2 SSD and 32/64GB of memory and a small form factor. The exact specifications of my NUC:

CPU: 3.1GHz Intel Core i7-8705G (quad-core, 8MB Cache, up to 4.1GHz)
Graphics: Radeon RX Vega M GH graphics (4GB HBM2 VRAM), Intel UHD Graphics 630
RAM: 2x Kingston HyperX 16GB DDR4
Storage: Samsung 970 EVO Plus 1TB M.2 SSD

The Intel NUC Hades Canyon

The Hades Canyon is in my opinion currently one of the best pre-build systems to get for a homelab environment. The dedicated GPU allow me (for example) to configure and play with GPU Passthrough in an RDS environment.

My laptop

Besides my homelab I have a 2019 Apple Macbook Pro and a Microsoft Surface Pro that I take with me at work. In my homeoffice I have an extra Intel NUC with Windows 10.

  • Apple Macbook Pro 15″ Touchbar (mid 2019)
  • Intel Core i7 (2,6GHz QuadCore)
  • 16 GB RAM 2400Mhz DDR4
  • 265GB SSD
  • Radeon Pro 555x 4GB

This laptop is running a Windows 10 Virtual Machine and applications like Edge Chromium (love it!), Office 365, RoyalTS, 1Password..

My current VM’s

My current homelab is running 6 VM’s with enough space/memory available to run more. This NUC will be able to run roughly +- 8 VM’s easily.
Currently i’m running a full (hybrid) RDSH environment with a few Azure components. All the VM’s are running on Windows Server 2019 except for the Ubiquiti VM, which is a Ubuntu VM.

  • 1x Domain Controller/DNS/Azure AD Connect/SQL Server.
  • 2x RDS Server (RemoteDesktop and RemoteApps).
  • 1x RD Web/RD Gateway.
  • 1x Management/Fileserver/RD Broker.
  • 1x Ubiquiti Unifi and UNMS server (which currently manages 3 different sites with routers/access points).

Besides this I have a Site2Site VPN to from my homelab to Azure, AD Connect and a few virtual machines, like a Windows 10 desktop for Windows Virtual Desktop and Azure storage for FSLogix profile containers.

4 Comments