Citrix Cloud - PowerState Unknown shown for all machines

Citrix Cloud - PowerState Unknown shown for all machines

book

Article ID: CTX316326

calendar_today

Updated On:

Description

  1. In Studio, you will notice that the power state for all machines is set to Unknown. 
  2. Restarting cloud connectors, VDA, etc. does not resolve the issue.
  3. The studio browser still shows Power state Unknown. 

Resolution

To resolve this issue:
  1.  Check to see if there are any pending power actions in the queue. 
  2. In order to do this, you must use the Powershell Posh SDK which can be downloaded from here - https://docs.citrix.com/en-us/citrix-virtual-apps-desktops-service/sdk-api.html
  3. Once downloaded run the below commands:
    • This command will load the Citrix PowerShell modules: asnp citrix.*
    • This command will authenticate you to your Citrix Cloud account: Get-XdAuthentication
  4. Check if there are any pending power actions.
    • Use command: Get-BrokerHostingPowerAction -State pending
    • You should notice there are many tasks pending. 
  5. Next, remove the pending power actions pending by running the following command: 
    • Get-BrokerHostingPowerAction -Filter { State -eq "Pending" } | Remove-BrokerHostingPowerAction
  6. Once removed, we then need to restart the hypervisor connection.
    • Note: if you have more than one connection, you will need to restart those also. 
  7. To get a list of your hypervisor connections, run the following command: Get-BrokerHypervisorConnection
  8. Take note of the "UID" field for each connection. 
  9. Once you have taken note of the UID, then run the following command to restart the Hypervisor connection: 
    • Reset-BrokerHypervisorConnection -HypervisorConnectionUid "Number seen in UID field after running the Get-HypervisorConnection".
  10. After resetting your hypervisor connections, power state should now show current status in Studio and you should be able to power manage your machines through Studio as expected. 

Problem Cause

  • The issue can be caused due to power actions failing to occur after a period of time. 
  • The issue may also occur if cloud connectors are updated before power actions have taken place.