Diagnosing long logon times is quite a challenge. Citrix Director breaks our logon time down into unique phase to help focus your attention on an aspect of the entire logon process instead of logon in its entirety.
Looking at my 100+ second logon time, I noticed I have a 24 second virtual machine start time. This is new for my environment.
If properly designed, the VM start time would add 0 seconds to a user’s logon time. We want our VMs ready before the user requests it.
If we look at the power management settings I have for this delivery group, we see that on weekdays, I have VMs powering on in the late afternoon, which is the time when my users (kids) get from school.
If we think about what happens during a VM start, we have the following:
- Virtual Apps and Desktops controller tells hypervisor to start VM
- VM powers-on impacting hypervisor resources (CPU, RAM and storage)
- VM registers with delivery controller and domain controller services
Looking at this process, I could see that
- My VMs were starting. So the delivery controller was using my power management settings
- The VM powered on and was booting, so I had resources.
- The VM was not registering with my delivery controller.
When the user selected a virtual desktop, the delivery controller started a new virtual machine, which happened to be on a different hypervisor. As all VMs use the same image, my issue was with the hypervisor being overcommitted. The virtual desktop wasn’t getting enough resources to fully start and fully register with the delivery controller.
It’s interesting that the long logon time wasn’t because of the VM in question; it was because of another VM that was misbehaving. But the VM start time in Director got me looking in the right direction… Why was my VM not ready to go?