Suspended virtual desktops: Approach with caution

Just a few weeks after installing a virtual Windows XP desktop on a Mac Mini I began to suspect that something was going horribly wrong. I had used VMware Fusion to install a Windows XP virtual machine, along with two programs written for Windows XP that hadn't yet made the transition over to the Mac: Adobe Creative Suite and Quicken 2010.

The Adobe products ran fine, if a bit slower than I'd have liked. But the personal finance program presented problems almost immediately. Quicken began suffering from intermittent crashes and file corruption issues -- a rather annoying and problematic situation when you're dealing with transactional updates to checkbooks, investments and other accounts.

At first I just thought it was Windows being Windows. But then, by trial and error, I seem to have discovered the problem: I had been suspending the virtual desktop instance with Quicken still running. That made resuming my work much faster and more convenient the next time I resumed the session. But when I made it a habit to quit Quicken and shut down Windows, my problems seemed to have gone away. I didn't think about why this might have caused the problem until I spoke with Harry Labana, chief technology officer for the desktop division at Citrix. The issue, he says, is that virtual Windows desktops don't do state management very well.

"The reality is that you can't guarantee an application's run-time state if you write everything back to a file," which is exactly what happens when you suspend a virtual machine. "User virtualization only virtualizes the static state, not the run-time state," he says. The idea that Quicken -- or Outlook or any other program for that matter -- will behave properly every time it resumes is "a pipe dream," he says.

The current state of affairs really isn't the fault of Fusion or XenDesktop any other virtualization software. It is instead due to the fact that the Windows operating system and the applications that run on it aren't designed to operate in this way. Applications that aren't written to be virtualization-aware can become unreliable if you try to suspend them. Most aren't.

And neither is Windows. Better state management, Labana says, "is something the core operating system would have to enable." While it's technically possible for Microsoft to do so, he's thinks it would be difficult - and he doubts that it's high on their priority list. "If they automatically write the last state that could be evolved, but a lot of stuff is happening at run-time in Windows. To freeze all of that, I don't think that's on their roadmap."

What's interesting is that this is exactly how some hosted virtual desktops are deployed in the enterprise: The user logs in, his virtual machine image resumes from a suspended state, and then returns to a suspended state when he logs off. Configured in this way, Windows never shuts down.

Administrators tend to set a virtual desktop infrastructure (VDI) in this way, rather than having the virtual Windows desktop boot up each time, so that the user's desktop loads quickly. In this way they can pick up right where they left off with their applications when, for example, they come home from work and first up the home PC and log back in after dinner. Indeed, this is a feature that vendors promote.

But if hundreds of virtual desktop users leave their applications running when they log off, could those users start running into trouble with at least some applications?

For my part I'm no longer suspending the Fusion virtual machine -- I just shut it down. Although it's not technically running in suspend mode, it does continue to use some resources. And with three user accounts on the family machine we don't need a fourth bogging things down.

Update: Mick Slattery, global lead of Workplace Enablement Services for Accenture and Avanade Accenture, recommends against suspending hosted virtual desktops. 

"Applications are still written primarily for physical desktops and are not virtualization aware. A best practice is to shut-down a virtual machine when a user logs-off, or is in an idle state for a pre-determined amount of time, instead of suspending the session. This releases compute resources for other tasks and improves the user density of the infrastructure. It also releases connections to other network resources that may no longer be required and would probably time-out anyways [such as] databases and mail servers."    

Copyright © 2011 IDG Communications, Inc.

7 inconvenient truths about the hybrid work trend
Shop Tech Products at Amazon