Jump to content


Photo

Why VMs in XenDesktop groups always shutdown/reboot automatically?

Started by chris lu , 19 September 2011 - 02:42 AM
13 replies to this topic

chris lu Members

chris lu
  • 10 posts

Posted 19 September 2011 - 02:42 AM

Dear Guys,
I'm a beginner for the Xendesktop, I found the VMs in the groups always shutdown or reboot automatically.
And if no any desktop connection, it will be boot up automatically.

Is there any settings on the Server or Policy? How to change it?



William Charnell Citrix Employees

William Charnell
  • 264 posts

Posted 19 September 2011 - 03:20 PM

XenDesktop 5 (and 5.5) provide mechanisms to power manage the desktop machines automatically, and this is normally configured using the 'Power Management' page of the wizard that you get to from the 'Edit Desktop Group' action. Also see this page in the edocs for more information:

http://support.citrix.com/proddocs/topic/xendesktop-rho/cds-control-power-management-rho.html

Regards
William



Mark Barlam Members

Mark Barlam
  • 25 posts

Posted 22 September 2011 - 12:35 PM

In testing I've found that you might have to set the Peak Hours to the entire day if you never want the VM's to Shutdown/Reboot automatically.
<div><div>Desktop Studio > Assignements > Edit Desktop Group > Power Management > Set Peak hours to Green Bar for the entire day. Do the same for Weekends if you wish.
</div>
</div>
<div></div>
<div></div>

Attached Files



Mark Barlam Members

Mark Barlam
  • 25 posts

Posted 26 September 2011 - 08:15 PM

WIlliam, I have a client that wants their VDM's to never shut down ever. They are currently using "Existing" Private Desktops.
<div></div>
<div>Doing a 1 to 1 assignment, my post above seems to fix this issue.
</div>
<div>For AD Group assignment (Existing/Pooled), I'm still having non-used machines shutting down.
</div>
<div></div>
<div>Is there a powershell script to run against a Desktop Group, Catalog, or Host to disable power management completely?
</div>
<div></div>
<div>thx.
</div>



Peter Barclay Members

Peter Barclay
  • 42 posts

Posted 26 September 2011 - 09:08 PM

I'd be interested to know if there is any fix for the pooled/random desktops - have you made any progress in this?

Specifically, I have users coming in early in the morning and are unable to log on for an hour or more.

I have one dedicated VM that seems to go into 'maintenance' mode on its own as well - is this the same issue with power management?



William Charnell Citrix Employees

William Charnell
  • 264 posts

Posted 04 October 2011 - 11:06 PM

If you want to you can turn off idle pool managment on a per-desktop-group basis; the way to turn it off differs between shared desktop groups and private desktop groups, but you can simply use both mechanisms to turn it off and it will work for each type. To turn off 'private' type groups you can say:

Set-BrokerDesktopGroup -name 'GROUPNAME' -AutomaticPowerOnForAssigned $false

and for 'shared' type groups you can say:

$dg = Get-BrokerDesktopGroup -name 'GROUPNAME'
Get-BrokerPowerTimeScheme -DesktopGroupUid $dg.Uid | Set-BrokerPowerTimeScheme -PoolSize (0..23 | %{ -1 } )

Regarding VMs going into maintenance mode, this happens if the VM repeatedly fails to register after being started by the broker. With the default timeout settings, to go into maintenance mode each VM start must fail to register for 20 minutes, and this must be repeated three times for each VM without any successful registrations.

The 20 minute limit and the count of times it must happen are both configurable via registry entries.

Regards
William



Nick Biolo Members

Nick Biolo
  • 208 posts

Posted 21 February 2012 - 03:51 PM

William, what is the primary cause for a desktop not to register with the DDC after power on? I have one to two desktops every week that do this. I have set up alerting in the event viewer so I can catch them and disable it right away, but I can't figure out why it is happening.

Also, could you tell me the registry locations for changing the timeframe/number of attempts before doing this? I'm wondering if I increase either if it will help prevent this from happening. Does this need to be done on the DDC, or each one of the Virtual Desktops?

Thanks in advance!



William Charnell Citrix Employees

William Charnell
  • 264 posts

Posted 21 February 2012 - 05:44 PM

There are a number of possible reasons why a VDA might fail to register with a DDC, such as
- problems with AD domain membership of VDA or DDC machine
- problems with network connectivity between VDA and DDC
- problems with configuration of list of DDCs in the registry of the VDAs (possibly set via GPO)

The steps to troubleshoot a problem with registration are given in:

http://support.citrix.com/article/CTX126992

You can adjust the length of time that the DDC(s) will allow before seeing a failure to register as a problem via the DDC machine registry entry:

HKLM\Software\Citrix\DesktopServer\MaxRegistrationDelayMin

which defaults to 20 (for 20 minutes).

William



Tom Swift Members

Tom Swift
  • 56 posts

Posted 19 April 2012 - 04:23 AM

I had dedicated machines powering off about 30 seconds after they displayed the CTRL-ALT-DEL to login and I got an error that Set-BrokerDesktopGroup was invalid running the following powershell script:

Set-BrokerDesktopGroup -name 'GROUPNAME' -AutomaticPowerOnForAssigned $false

After reading more forum posts on this I found I had to include the following first when running the powershell script:

asnp Citrix.*

Final:

asnp Citrix.*
Set-BrokerDesktopGroup -name 'GROUPNAME' -AutomaticPowerOnForAssigned $false

Fixed my dedicate XenDesktop shutdown issue.



Nick Biolo Members
  • #10

Nick Biolo
  • 208 posts

Posted 19 April 2012 - 09:22 PM

You can also access Powershell from within Desktop Studio. If you access it this way you do not need to load the snapin. To get ther lauch Desktop Studio > Click Desktop Studio (top left corner of the MMC) > Click Powershell Tab > Launch PowerShell.

Hope it helps!



Prince Cassius Eweka Members
  • #11

Prince Cassius Eweka
  • 31 posts

Posted 16 June 2012 - 02:30 PM

I am still puzzled with all the complexities that is associated with what should be a simple process.

From what i am reading, my XD56 VMs in dedicated catalog still shuts down. Is there a way to keep the dedicated catalog always on after someone logs off? One would think since users have the right to reboot their machines, a dedicated catalog should always leave the VMs on.

I can't seem to get this to work even after running all the rocket-science-scripting that is being suggested. I have attached a snapshot of my current settings.

What am i missing?

Thanks for reading.

Prince

Attached Files



Colm Naish Citrix Employees
  • #12

Colm Naish
  • 88 posts

Posted 22 June 2012 - 11:21 AM

Hi Nbiolo

If you are having trouble with VDAs not registering the easiest place to start looking would be the WorkstationAgent log. There is a new tool called LogEnabled (http://support.citri...ticle/CTX127492) which you can use to turn on VDA logging. You should be able to see the registration sequence being attempted in the log, which will give an indication of what might be goign wrong. You may still need DDC side logging but I would start with the WorkstationAgent.

Hope this helps

Colm



Colm Naish Citrix Employees
  • #13

Colm Naish
  • 88 posts

Posted 22 June 2012 - 11:23 AM

Meant to add LogEnabler can also be used to enable logging on the DDC (Broker) Server. In the case of investigating registration issues you would just need to focus on the BrokerService log to start with, in conjunction with the WorkstationAgent log.

thanks

Colm



Kevin Yap Members
  • #14

Kevin Yap
  • 29 posts

Posted 03 February 2014 - 09:44 PM

I have a XenDesktop 7.1 environment and I want to disable shutdown for a "static" desktop group in which I have assigned persistent VMs. I tried disabling per CTX127842 but this article indicates that this does not pertain to XenDesktop 7.1. Does anyone know how to disable this behavior for static desktop groups for XD7?