Unity + vmware-unity-helper = Parallels for Ubuntu
25 August 2010A friend of mine has parallels for OSX on his macbook. It is fairly cool – having a Windows-only program appear to be running natively in OSX. With parallels, there’s no need to dual boot – just use your favorite OS (OSX) and your favorite windows apps seamlessly. This enabled my co-worker to open up VMware’s vSphere Infrastructure Client from within OSX – something that normally takes a ton of configuration and hacking to accomplish.
I was a little jealous that my Ubuntu 10.04 LTS couldn’t do the same… or could it?
I recently passed my VMware Certified Professional 4 exam and as part of the congratulatory package from VMware, I received a copy of VMware Workstation 7 for free. I choose the Linux flavor because that’s what I prefer to use as my primary OS. I fired up a VM of XP, and started tinkering around when I came upon the Unity feature. For supported VMs with VMware tools installed, Unity will allow you to interact with the guest OS/programs as if they were native to the host. Behold!
(That’s the XP system information window sitting on top of a Linux console running top, on top of the Windows Live Writer program)
Unfortunately, to get to this point, I had to manually start the XP VM, then wait for VMware tools to start up before I was able to manually click the Unity button. It’s a boring, repetitive process – so like most things, I decided to see if I could script it somehow.
Enter vmware-unity-helper
I came upon the vmware-unity-helper tool somewhere in the VMware Communities. The question was asked, “How can I get a VM to automatically start with my OS” and the unity helper tool was mentioned in passing. A bit of Googling later and I had my answer.
vmware-unity-helper –run /path/to/vmx-file/vm.vmx "c://path//to//program.exe"
This command will attempt to run the specified program in the VM specified by the vmx configuration file. If the VM isn’t running, it will automatically start it, and when VMware tools starts up, the program is run.
To make my life a little easier, I created a very simple bash script that would run the vSphere client.
After marking the script as executable, I can now run it and have the Infrastructure Client running “natively” in Ubuntu!
The only downside is that I can’t seem to fully maximize the windows… they seem to only maximize to the top portion of the screen. It may be related to guest resolution, but I’m not certain. For now, manually resizing is sufficient for my needs.
I'm a computer nerd. I find cool stuff and post about it in my house. My Tech House.

