Citrix VDA Power State Shows as Unknown in Citrix Studio

I have come across this issue many times where the Xenapp / Xendesktop / VDA machine power state shows as unknown in Citrix studio and as a result the machine is not available for users to log on to or manage within citrix studio (Restart, shutdown and so on)

This issue is caused by the citrix broker server having issues to communicate with the hypervisor or VDA machine.  There are many reasons and solutions for this which I will cover below.

Citrix VDA Power State Shows as Unknown

Resolving Power State Shows as Unknown in Citrix Studio

To resolve the power state shows as unknown in citrix studio I have a few solutions, I will start with the simple solutions first.

1. Check Citrix VDA Services Are Running

The first thing to check is if the required windows services are running on the VDA machine.  Sometimes the services are started and needs to be restarted. To do this do the following

  • Open services.msc via the start menu
  • Scroll down to the citrix services
  • Restart all citrix named services (Shown Below)

citrix services

2. Check Citrix Broker Service

Next we need to make sure that the citrix broker servers are healthy. Logon to all citrix broker servers and make sure the citrix broker service is running.

citrix broker service

If it is running on all servers restart the service on each server, Restart one one server then wait min of two minutes before restarting on another server.

After restarting all the services wait ten minutes then check the Appliocation eventvwr logs, Filter the source to “Citrix Broker Service” and review any events that were logged recently.  There might be some logs here which could point us towards the root cause.

eventvwr citrix broker

Above I can see the error

Event ID : 1201
Source : Citrix Broker Service
Message : The connection between the Citrix Broker Service and the database has been lost.

Here I can see the connection to the SQL database was lost, If you are getting this error make sure to check your SQL server.

3. Check Connection To Hypervisors

We now need to check the connection from the citrix broker server to the hypervisor.  To do this on any citrix broker server open powershell and run the command Get-BrokerHypervisorConnection now check the state.  The state should be On. More information here about this process

Get-BrokerHypervisorConnection

If the state is unavailable we need to check the connection.

  • Open citrix studio
  • Click on Configuration > Hosting
  • Select the hosting connection you need to test
  • Make sure state is enabled
  • click test connection

citrix hosting connection

The test will now run and will report any errors it finds.

4. Check Citrix PVS Servers

Typically your citrix provisioning servers need to be rebooted every few months.  If your provisioning servers are not rebooted regularly they can cause issues.  To verify if your PVS servers are healthy I usually check the following.

Check that the following two services are running on all PVS servers

  • Citrix PVS Soap Server
  • Citrix Stream Service

Check the eventvwr \ Application logs for any errors with the streamprocess or streamservice.  Below you can see I have an Event 11 error for the streamProcess.

citrix pvs eventvwr

Now lets check the PVS health in the console, open the “Citrix Provisioning Services Console” from the start menu, Click on the servers folder and make sure the connections are evenly spread across the PVS servers.

Below you can see PVSSERVER-P1 has 37 connections whilst PVSSERVER-P3 has 31. This is an indicator that PVSSERVERP3 has an issue.

citrix provisioning servers

Next Click on “Vdisk Pool” right click on your vdisk where the VDAs are having an issue and click “Show Usage”

You should see a list of all VDA machines, if you just see a blank screen like below this means there is an issue with the PVS server.  I recommend to reboot all PVS servers, I also recommend to reboot one PVS server at a time and do it out of hours.

pvs vdisk pool

5. Manually Reboot VDA Machine

Sometimes if you manually restart the VDA from the hypervisor it will restore the power state in the console.

reboot vm

6. Check UID Of Unknown VDA’s

Each VDA has its own unique ID, is it possible that the UID of the VDA in citrix is different to what is on the hypervisor.  If there is a UID mismatch you will not be able to manage that machine from the citrix environment.  To check the unique ID of the machines do the following.

  • Open powershell on a citrix broker server
  • Run the following three commands
    asnp Citrix*
    $ErrorActionPreference=Continue
    Get-ChildItem -Path XdHyp:\ -force -recurse | ?{ $_.IsMachine } | Out-File –Filepath c:\Temp\VMIDS.txt
  • This will output a file at c:\Temp\VMIDS.txt
  • Now in powershell run the command Get-BrokerMachine -PowerState Unknown this will list all the VDAs that have the power stsre of unknown.  Note down one of the VDA “HostedMachineId”
  • Open c:\Temp\VMIDS.txt and compare “HostedMachineId” (From previous step) to the ID in c:\Temp\VMIDS.txt
  • if there is a mismatch of ids we need to run a command to update the citrix database.
  • Backup the citrix database before making any changes.
  • In powershell run the command Set-BrokerMachine -MachineName ‘MyDomain\MyMachine’ -HostedMachineId [machine ID from c:\Temp\VMIDS.txt]
  • Log back in to citrix studio and check the machine power status, If it is still showing as unknown you might need to restart the “Citrix Broker” service.

Add a Comment

Your email address will not be published.

Left Menu Icon