VMWare Server 2.0: How web-based fails and a work-around for the masses

Well, I’ve recently gained some employment where I’m making use of VMWare Server to run a Windows 2003 virtual machine.  This VM runs ION Enterprise, Schneider Electric’s energy management package.  The project I’m working on will involve communicating with this software package.

Now, I’m working from home, and luckily I had the foresight to upgrade my desktop (actually, my hand was forced, the old one died) and I settled on purchasing a new 64-bit system based around the AMD Phenom II X6 1090T, which amongst other things, features the AMD-V virtualisation feature.  I’ve used it with VirtualBox OSE and it runs rather well.  However, for this job, the image I had was for VMWare.

Yes, I could “convert” it over to running on VirtualBox, but what if the hardware was different?  Windows doesn’t like that sort of thing.  The CPU changing model would be bad enough, and there was nothing I could do to prevent that, but I wanted to keep as much identical as possible.  So I began by installing VMWare.  There were two options I considered; Server and Player.  I figured Server had some nice features, one of which being that I can access the VM remotely.  I often like to work on the front verandah at home where there’s a nice cool breeze, this would enable me to run client software on my laptop and access it via the network.  Sounds good.

Sounded good.

The web interface firstly, relies on SSL 2.0 as its means of security.  Ewww! SSL3 was out in 1996, why are we using a security protocol that’s so old, and fundamentally broken?  Well, I’m not sure whether SSL3 is absent, or broken with regards to Firefox, but Firefox sure doesn’t like it, and won’t talk to the web interface until you apply one small hack to about:config, which enables SSL 2.0.

Now, once that’s done, you can at least log in and do things with the server.  All well and good.  I had some fun and games getting the image to boot, it turned out the disk image set for one of the drives was in the wrong place.  Some symbolic linking fixed that, and I had Windows 2003 booting.  No worries, but where’s the screen? I’ll come back to this.

VMWare Server 2.0 abandons the remote console it appears in favour of a web interface.  They don’t mention this in the documentation however, and when I at first couldn’t get at the web interface, my first instinct was to just install app-emulation/vmware-server-console. At first it refused to start, I had to apply some patches and install libraries from here to get it to even come up, lest I got a message about undefined symbols. It’s times like this I really begin to despise closed-source software. The clincher though was when I tried to log in, I was confronted by this:

Unable to connect to the remote host: 501 Global command GLOBAL server-vmdb to non-host agent targets not supported.

No one seems to know exactly what that geek-speak gibberish is supposed to mean. Best I can ascertain is that current versions of VMWare Server Console are for VMWare Server 1.0, and not compatible with its more modern counterpart. Everyone’s solution was to “use the web interface”. Now prior to that SSL hack, all I’d get is the server slamming the door in my face. Firefox would refuse to connect remotely. I discovered I could log in when running a local Firefox instance on the machine running VMWare Server.

That’s fine, got the VM set up and booting, try to bring up the screen. At first it needed to install a plug-in for the VMWare console, that’s fine, I do this and restart Firefox (3.6.8), then try again. I click on the screen area. It sits there for what seems like 30 seconds doing nothing, no acknowledgement that I had clicked it, I clicked a few times before it finally informed me:

Cannot access virtual machine console. The request timed out.
The attempt to acquire a valid session ticket for "Windows 2003 Server" took longer than expected. If this problem persists, contact your system administrator.

I did exactly what it said. I conversed with myself at considerable length to the problem while I researched the problem. I drew blanks every time. F$#!% VMWare, what ever happened to a desktop client?! Heck, why not open a VNC port or something?

Further research seemed to suggest it was a glitch with Firefox 3.6. On a hunch, I fired up VirtualBox, and started up a Windows XP VM which had IE8 installed. Pointed that at VMWare, and voila, I was in. It seems extremely silly to require another VM (a competing VM no less) to access the first, but at least I had access. That got me thinking as to whether I could coax the plugin to work somehow.

This morning, I had another crack at it. Looking in the Mozilla extensions, I noticed the following directory structure:
stuartl@beast ~/.mozilla/firefox/new7diw5.default/extensions/VMwareVMRC@vmware.com $ find . -maxdepth 2
.
./install.rdf
./plugins
./plugins/vmware-vmrc
./plugins/bin
./plugins/np-vmware-vmrc-2.5.0-122581.so
./plugins/vmware-vmrc-daemon
./plugins/xkeymap
./plugins/vmware-desktop-entry-creator
./plugins/lib
./plugins/open_source_licenses.txt
./plugins/share
./plugins/vmware-vmrc-legacy
./plugins/libconf
./install.js
./components
./components/xpcom-vmware-vmrc-2.5.0-122581.xpt

Ohh, a bin and lib directory? Interesting. I had a peek inside.

stuartl@beast ~/.mozilla/firefox/new7diw5.default/extensions/VMwareVMRC@vmware.com/plugins $ ls -l
total 904
drwxr-xr-x 2 stuartl stuartl 4096 Dec 15 17:17 bin/
drwxr-xr-x 61 stuartl stuartl 4096 Dec 16 07:25 lib/
drwxr-xr-x 4 stuartl stuartl 4096 Dec 15 17:17 libconf/
-rw-r--r-- 1 stuartl stuartl 684016 Oct 10 2008 np-vmware-vmrc-2.5.0-122581.so
-rw-r--r-- 1 stuartl stuartl 201997 Oct 10 2008 open_source_licenses.txt
drwxr-xr-x 4 stuartl stuartl 4096 Dec 15 17:17 share/
-rwxr-xr-x 1 stuartl stuartl 738 Oct 10 2008 vmware-desktop-entry-creator
-rwxr-xr-x 1 stuartl stuartl 738 Oct 10 2008 vmware-vmrc
-rwxr-xr-x 1 stuartl stuartl 738 Oct 10 2008 vmware-vmrc-daemon
-rwxr-xr-x 1 stuartl stuartl 738 Oct 10 2008 vmware-vmrc-legacy
drwxr-xr-x 2 stuartl stuartl 4096 Dec 15 17:17 xkeymap/

There were no executable bits set at the time however. They are AMD64 binaries however. So I chmodded and tried running vmware-vmrc. It failed due to some other permission errors, particularly lib/wrapper-gtk24.sh, needed execute bits set too. After fixing that, and some permissions on ~/.vmware which wound up being owned by root, I was looking at the VMWare Remote plugin … running stand-alone.

VMWare Remote Console plugin

VMWare Remote Console plugin, working stand-alone

This is about as close as I can get to a separate app. It took a bit of experimentation to get this to work, but in the Hostname field, you need to include the port number; so in my case it was localhost:8333. The rest is fairly self explanatory. I still can’t log in via the web interface, but at least now I can get in without a second VM.

Ohh, another rant, they forgot CTRL-ALT-DEL. Luckily, there’s this. Use the numeric keypad dot (also “del”), that seems to work here.