Tuesday, 5 May 2009

Live your life in Unity

Virtual machines; if you are doing development, and you aren't regularly using virtual machines, then you are probably missing a trick. Or several.

Interestingly, one of the new features announced in Windows 7 is the ability to run XP applications in a virtual machine, but per-application, and on the same desktop (rather than in a VM console). This is Windows Virtual PC - but it isn't as radical as it sounds, after all, VMware Fusion has been doing this on the Mac for years.

Of course... Windows Virtual PC is only useful if you have the right version of Windows 7 (which isn't yet released). And you might not want an XP guest; developers are typically running virtual server platforms, for example.

As it happens, I'm a VMware user (primarily of the free VMware Player, as my needs are simple). This lets you run guest OS platforms in a console on the desktop - for example, here we have an XP host (showing a copy of C# Express in the host) and VMware Player. The guest OS is Windows 7 (RC), also running C# Express:

image

While this works, it doesn't make good use of screen real-estate:

  • the guest applications are limited to the guest console (see how the guest application is clipped) - you can't move them outside the frame, etc
  • you have two desktops / start menus / task bars / etc to contend with

And of course, if you have a small screen (laptops etc) this only gets worse.

Now - maybe I missed the big announcement, but towards the end of 2008, "Unity" support was added - even into the free player. A range of common guest platforms are supported as long as you have VMware Tools installed on the guest machine.

So if Windows VirtualPC might let us run XP apps on a Windows 7 desktop, can we run Windows 7 apps on an XP desktop? You can with Unity. Switching modes is simple:

image

This has a very dramatic effect; our console window minimises itself, and the guest applications are transferred to the host desktop. Here we have a selection of host / guest applications to show how they can be mixed:

image

Two of those are running on the guest- and two on the host; but all function as you would expect. We can now move all the guest applications where ever we want, resize them, stack them, drag them onto different monitors, etc.

You get some visual clues: the VMware logo and some border shading (these options can be configured in the Workstation product); you also get access to the guest system's start menu (or equivalent) when you go near the host menu - letting you start new guest applications:

image

Overall - a very satisfying way of developing on virtual platforms. It feels very natural and intuitive. Now we just need Remote Desktop (and competition) to catch up and have remote applications rather than the whole desktop.


EDIT: this exists, via RemoteApp


Note: the screen-shots above are using VMware Player; for serious development the Workstation product may be worth considering - as (even before Unity) this has a wide range of more advanced features to let you develop efficiently (and fix things quickly when you break the server), including Unity of course.

I don't know about you, but I'm smitten.

4 comments:

Svish said...

How do you create your virtual machines? Do you have another VMware product in addition to the Player, or do you use Virtual PC for that? Also, where can you read about this Unity feature? Was that in VMware Player? Can't see anything about it on the VMware Player feature list... I would think such a cool feature was worth mentioning on a page like that... (Or is it just me who can't see it?)

Marc Gravell said...

For existing Virtual PC images I'll use VMware Converter (you get slightly better performance with a native VMware image).

For new images, http://www.easyvmx.com/

Yes: "Unity" is in the free player from 2.5 onwards - here's the 2.5 release note: http://www.vmware.com/support/player25/doc/releasenotes_player250.html

Marc Gravell said...

If you can't see all of the link:

http://tinyurl.com/VMwarePlayer25

Svish said...

Cool. Will try those out!