Linux users rely on a web interface to manage their VMware servers  – for lack of a native client . For most basic administrative functions on Linux, you can use your own choice of browser, but what if you want to access the console of the virtual server, and your browser needs to integrate the plugin provided by VMware? The browser plugin is designed specifically for your Internet machine and for the underlying operating system. In the case of VMware, access to the console for Linux users means deploying a browser that understands the XPI plugin format – that is, Firefox and its relatives (Listing 1).
Listing 1: Browser Plugins for VMware Server 2.0
$ pwd /usr/lib/vmware/webAccess/tomcat/apache-tomcat-6.0.16/webapps/ui/plugin $ ls build_doNotErase.txt vmware-vmrc-linux-x64.xpi vmware-vmrc-linux-x86.xpi vmware-vmrc-win32-x86.exe vmware-vmrc-win32-x86.xpi
However, Firefox users with version 3.6 are locked out of the remote console. Without a noticeable error message, the connection times out before it can be opened. If you replace the browser with any 3.5.x version, it will work as it always has.
Some research on the web shows that many users have had this problem. Fortunately, you never need to wait long for an actionable workaround. The most obvious approach is to use a version of Firefox that works. It really doesn't make much difference whether you decide to fall back to the previous version of the browser or just install a second version parallel to it, but there is another approach.
While rummaging in the browser's plugin directory, I discovered an interesting file structure that comprises a
bin directory and another directory for
lib. It looked very much as if the plugin software could run separately outside of the browser and might even be completely independent of the browser.
An exhaustive process list with Firefox 3.5 running the plugin confirmed this suspicion. Everything hinges on the
vmware-vmrc executable, which turns out to be a simple shell script on closer inspection.
A couple of additional tests revealed that users can store and use the required files anywhere they like. Additionally, not all of the objects stored in the plugin directory are absolutely necessary.
How It Works
To set up a newly installed Linux system with the standalone version of the console for virtual VMware guests, you just need to follow three steps. You can start by extracting the required plugin from the VMware server package. The easiest approach is probably just to copy the corresponding XPI file from the
/usr/lib/vmware/webAccess/tomcat/apache-tomcat-*/webapps/ui/plugin directory on the VMware host. The second step is to extract the required files and directories from the plugin. Because XPI files are basically ZIP archives , unpacking is a fairly simple task (Listing 2).
Listing 2: XPI Files Are a ZIP Archive
01 $ unzip -l vmware-vmrc-linux-x64.xpi 02 Archive: vmware-vmrc-linux-x64.xpi 03 Length Date Time Name 04 --------- ---------- ----- ---- 05 0 10-10-2008 20:27 components/ 06 1543 10-10-2008 20:27 components/xpcom-vmware-vmrc-2.5.0-122581.xpt 07 1677 10-10-2008 20:27 install.js 08 1242 10-10-2008 20:27 install.rdf 09 0 10-10-2008 20:27 plugins/
After extracting the structure, you only need the
plugins subdirectory and the
share directories (Figure 1).
The third step is to copy these directories into an arbitrary target directory. Finally, notice that the
vmware-vmrc shell script is in the
plugins directory. This step completes the preparations.
Now you can simply type
to launch the program. You need to specify the VMware host and authenticate by providing your username and password (Figure 2). After completing a login, the next window lists the configured virtual server. Then, a couple of mouse clicks later, you are connected to the console on the required VMware guest.
You can handle authentication at the command line. The options for this are
h to specify the VMware host and
u to specify the user. Depending on the web interface configuration, you might need to define the SSL port in
Hostname:Port notation; however, this is not necessary for standard port 443.
p option, you can even specify your password, but this is not recommended because your password would appear in the clear in the process listing. A typical command line would thus be:
vmware-vmrc -h <Hostname> -u <Username>
You have to authenticate separately for each new console connection, which is an obvious restriction compared with the browser and plugin approach, but the advantages far outweigh this issue – especially because you are independent of the browser. Users who have time to do so can bundle the directory structure into the package format of their favorite Linux distribution.
What originally looked like a problem actually opens up new opportunities. The method introduced in this article allows the Linux user to access the console on virtual VMware guests without using a browser. The few steps required to set this up are quite simple and quickly completed.