High Availability of User Session in Citrix Xendesktop


My team needs to setup a citrix xendesktop 7.1 environment with storefront.
I want to know whether we can design environment is such a way that lets say i have  5 nodes
in which our VDI env is setup in our datacentre...(the hypervisor is vmware-vsphere 5.1U1) and say if one node fails
using V-motion we can move the VM to next node but what i want to know is there anything we can do so
there is a seamless failover i.e the user's session doesnt get disconnected and he does not know such a failover
happened .

Another scenario is even if there is a disruption due to this failover and user gets disconnected then
can he get back same session although now his VM move to second node.
Who is Participating?

Improve company productivity with a Business Account.Sign Up

Tony JConnect With a Mentor Lead Technical ArchitectCommented:
Oh and to answer that bit Sukku - http://www.experts-exchange.com/Software/System_Utilities/Remote_Access/Citrix/Q_28325406.html#a39747490 :

No. vMotion is fantastic for moving an active virtual server to a different physical host. Storage vMotion can move the guests underlying virtual disk between different storage.

Note though that these are technologies for moving active, running, virtual guests.

VMware High Availability (HA) will simply attempt, based on various rules, to restart a guest virtual machine on an alternative, running physical vmware host, if the physical host it was originally running on fails for some reason.

I think, perhaps, you may benefit from reading up on vMotion, Storage vMotion and HA for VMware and then look at the Citrix eDocs and blogs to clarify what can and cannot be achieved - right now it appears that you're mixing the technologies up into a configuration that cannot actually do what you think it can.

And that's not meant as a criticism in any way - we're all here to, and happy to, answer any questions you have.
Dirk KotteSECommented:
if one VM-Ware host fails the running servers (or desktops are dead also - mostly)
HA and the desktop-controller can restart the desktop at the remaining server(s) but the session is killed.
There are tools which run the same server/desktop at different hosts simultaneously (i think everrun from marathon) - here you switch from the died server to the running without disruption...

if you use VMotion while a user is connected to his desktop this should work without notice by the user (otherwise you have a configuration error).
Sukku13Author Commented:
Do u mean with vmotion when one esx host in my cluster fails desktops and their current session remains and moves to another esx host..what if the ddc controller who granted those user session failed then will existing session's move to second ddc which is in HA mode.
During this entire process will user experience that a disruption has happened
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

Tony JLead Technical ArchitectCommented:
Well in theory you could run a single core, single CPU system in lockstep. In VMware terms, this creates two virtual machines - one is running live, connected to the network etc and the second is running in CPU and memory lockstep - i.e. it is doing exactly the same thing as the first node.

In the event of a failure of the first node, the second continues as though nothing has happened.

Well. That's the theory but look at the downsides:

You have a single CPU with a single core - try running a virus scan on that baby and it'll grind to a halt;

In the vast majority of cases, a system goes down in a way that would cause the lockstep partner to also go down (BSOD etc).

You are wasting resources for no reason whatsoever.

vMotion and storage vMotion can move the virtual machine between the host or storage whilst running; High Availability (HA) will attempt to restart the virtual machine on an alternative physical host but all services are interrupted in the meantime (and there are no guarantees that the virtual guest will restart if, for example, the remaining hosts are resource constrained).

I think you may have a fundamental misunderstanding of what XenDesktop Sites provide in terms of high availability - I would suggest you start here: http://support.citrix.com/proddocs/topic/xendesktop-7/cds-plan-example-deploy.html

In a nuthshell - no, there is no automatic, session-stable, failover.
I wonder if the Citrix Netscaler has the ability to maintain and move a session to another host if the backend host fails.

The article suggests the Netscaler  "may" be able to do this..

Sukku13Author Commented:
Thanks I also came to know that by properly having ddc high availability and configuration of VDA this is possible
Tony JLead Technical ArchitectCommented:
Look - you are both mistaken here.

You are asking if it is possible to reconnect to a lost session when the physical host serving said session has died. That is not the same thing as reconnecting to a disconnected but active session:

http://support.citrix.com/article/CTX136762 is referring to reconnecting to active sessions - that is to say, a user doesn't log off they disconnect. Their session and the server (host) it is running on are still active and alive. Workspace control and session roaming.

Consider how VDI works for a moment - a virtual machine is streamed from a server - be that physical or virtual, it doesn't matter.

The VDA simply does clever tricks like create a MAC address on the fly and generate computer names for AD etc. It has no bearing on HA environments.

Now...when a user connects to a virtual desktop, it isn't usually running until such a time as they need it. It's created and booted ('spun up') and streamed in near real-time over the ICA protocol from a master image.

And even if it was running in the background, you are asking for something to hold a second virtual desktop in memory, disk and CPU lockstep - i.e. that a second VDI session is doing an identical thing to the one your user is connected to, but not actually connected to the network... as I mentioned in my first answer, you could potentially use VMware Fault Tolerance to do this but it sucks. It's waste of resources and limited to single core, single CPU virtual machines which bog down trivially in VDI environments.

Step back a second and look at it another way - if I have a laptop (laptop A) and use it to run a virtual machine in VMware workstation and I have another laptop (laptop B) running VMware Workstation and I hit the power button on Laptop A you wouldn't expect Vmware workstation on Laptop B to suddenly take over the virtual machine and carry on where it left off, would you?

But in essence you are expecting something in Citrix to do this?

How would you, realistically, expect a NetScaler device - one which tends to sit in your DMZ for that matter, to know what users are doing in real time across potentially thousands of streamed desktops and potentially across multiple data centres - possibly globally spread? Desktops it doesn't really know or care anything about beyond proxying SSL to ICA?

Yes, you can build an environment that will be highly available but that isn't the same thing as transferring live, active, sessions on a dead host to a running one!

Sorry but to answer again - there is no way you can do what you want to do with any Citrix only solution and Vmware FT won't work well.
Tony1044, this is a great answer which I learned something from!!!

Thanks Again, I see why your are a Citrix Genius!!
Tony JLead Technical ArchitectCommented:
You are more than welcome and I'm always happy to help. I'd hate to think you got the wrong information and then passed that on to managers, setting potentially unrealistic expectations.
Sukku13Author Commented:
Tony thanks for detailed answer..dont feel irritated if I ask a clarification more..all my citrix servers ddc..vms as well as user vm are served by a cluster of esx physical hosts..say if one ddc vm ouy of 3 fails then can connect ed user still retain is session. .
Also if 4 esx hosts as a cluster is serving all ddc then if one host fails cant vms there have a vmotion without getting powered off
Dirk KotteSECommented:
Great Explantation by tony1044!
he say all already...

if the vm-ware host (running the desktop or ddc) goes down unexpected all running vm from this host are down also typically.
vm-ware ha restart the needed vm's -- if ressources are availeble- at oher hosts.
the restarted vm have a state like after bsod or disconnecting a power cord.
if one (of more than one) ddc's goes down your users should be able to create new sessions using one of the other ddc's.
you have to build virtual redundant servers within netscaler and then netscaler using one of the remaining ddc's.
running sessions don't need a ddc. the ddc is for session creation only.
Sukku13Author Commented:
Since my understanding is DDC maintains the connected user sessions then with some kind of citrix configurations shouldnt it be possible to keep the Sessions alive even if the physical esx host which is having the virtual ddc host goes dead or even if the virtual ddc host powers off and the DDC VM moves to a different host in cluster...i have around 3 DDC VM's up and running and each of them is tagged to a different ESX host in the cluster
Sukku13Author Commented:
one of my citrix guys told that while configuring the VDA inside each VM-Virtual desktop they mention all the DDC server names in the config...will this add any value to maintain session HA
Sukku13Author Commented:
@DKOTTE -- I didnt understand what you meant by below comment

"you have to build virtual redundant servers within netscaler and then netscaler using one of the remaining ddc's".
Tony JLead Technical ArchitectCommented:
Sukku - you are confusing a Citrix session with a compute state.

A Citrix session is basically a connection to a particular Citrix server and the published application on it - that could be a desktop in the world of Citrix.

It will maintain a limited amount of detail such as when the user connected and what processes are running and if the session is active or disconnected.

A compute session is what is currently executing in memory or what the processor and disk are actively doing. What is in cache or graphical memory. In real time.

Again - if the server holding the sessions dies there is nothing built into Citrix to tell any aspect of the environment what was happening in the compute session.

To clarify what I believe Dkotte meant (and apologies if I misinterpret but I believe it's fairly clear as his answers normally are) - you build more than one DDC. You then, for want of a better term, register the DDC"s within the NetScalers.

If you lose a DDC the NetScalers can automatically take them out of load and redirect new traffic to the remaining DDC's.
Sukku13Author Commented:
Hi sorry if I confused you tony..your answet is very clear..what I am bothered is citrix session..wat I want to ensure is if any of the ddc or pvs servers goes down..I dont want an existing citrix session to get killed but user can experience a disconnect which is ok..because when he reconnects hell see same word doc and notepad session open on which he wad working on
Sukku13Author Commented:
So technically which citrix server maintains a session once it's established...lets say ddc goes down but the actual user vm is still alive..then I hope user still has an active session...if the vm which was given to user goes down then ..as per what u said..it vmware will restart vm on different host and restart means ill get a new session
Sukku13Author Commented:
I've requested that this question be closed as follows:

Accepted answer: 0 points for Sukku13's comment #a39748173
Assisted answer: 100 points for Tony1044's comment #a39744014
Assisted answer: 100 points for Tony1044's comment #a39747095
Assisted answer: 100 points for dkotte's comment #a39747854
Assisted answer: 100 points for Tony1044's comment #a39748048
Assisted answer: 100 points for Tony1044's comment #a39748059

for the following reason:

Very clear answer
Sukku13Author Commented:
Tony answer is clear
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.