A renaissance view of technology

Installing VMWare Tools with VMWare Player

Once you have your virtual environment setup and an OS installed, it is very likely that the system will not perform to its absolute potential. That’s because the “hardware” which VMPlayer and VMWorkstation emulate is not supported by Windows or Linux by default. That’s where VMWare Tools comes into play. VMWare tools supplies all the necessary drivers along with several handy tools and applications to extend the functionality of VMWare Workstation and VMWare Player.

However, here is the catch: VMWare Tools is not available as a separate download and only comes bundled with the VMWare Workstation and, moreover, VMWare Workstation is not a free application.

There is a way to get around this though. As of this writing, it is still possible to download a “trial” copy of VMWare Workstation. You will most likely need to uninstall VMWare Player (if it’s installed) and then install the evaluation copy of VMWare Workstation. Once VMWare Workstation is installed and you boot up your virtual Windows or Linux OS, simply click VM->Install VMWare Tools… in the menu. This will automatically connect an ISO image on your hard drive to the virtual CD-ROM/DVD drive. For Windows users, this means the “autoplay” feature should automatically bring up the installation program for you. For Linux users, it will mount the drive and open a file browser, where you can either install the RPM (recommended) or install from source.

So what happens when the evaluation copy of VMWare Workstation finally expires? If you enjoyed using it and found it to be far superior than VMWare Player - why not consider purchasing the full-blown version? If this is not possible, you can always remove VMWare Workstation from your system (via Add/Remove Programs) and re-install VMWare Player. The installation of VMWare Tools will not be removed if you remove VMWare Workstation.

Another option is to copy the VMWare Tools ISO files (each OS should have its own ISO file) from the VMWare Workstation installation to a backup location for future use. This of course assumes you have purchased the full version of VMWare Tools. Doing a search for “.iso” should show you the location for your installed version. Once copied to a backup location, you can now easily mount the ISO file within your VMWare virtual environment and install VMWare Tools.

Tags: , , ,

VMware Raw Disk BSOD

Recently, I switched over to Linux as my desktop OS at work. The OS (Fedora) was installed on a dedicated drive and I kept my XP install intact on its own drive, knowing that at some point I may need to boot into Windows to run some application or test a web application in Internet Explorer.

As the weeks went by, I found that I rarely needed to boot into Windows, and, if I did, I only needed to be in the OS for just a few minutes. Rather than having to reboot each time to switch into an OS, I decided to jump into the world of virtualization.

I knew I could simply install Windows into a new disk image, but why do that when I already had a dedicated drive with Windows XP installed? Besides, if reinstalled, all my settings and drivers and programs would need to be reinstalled - no fun! So I began researching into using VMPlayer (free) with an entire disk of a pre-installed OS - and it is indeed possible.

I followed the directions step-by-step to Run Your Windows With VMware (the site requires a free registration in order to read the article - but getting your hands on Linux Mag articles is a good idea anyway) but ran into a few caveats:

VMplayer insisted it could not find the windows.vmx file.

This was resolved be ensuring that the files had the proper owner/group and permissions to read and write. Because I was logged in as root (via su) to do most of the legwork in creating the needed files, VMplayer did not have the sufficient read/write permissions. Once this was fixed, VMplayer began booting Windows XP, and the familiar logo and progress bar soon appeared. My hopes were dashed when the system suddenly “blue-screened”, which brings us to the next caveat:

0×00000007B Stop Error

After much research and wildly varying opinions on various blogs I think I may have rooted out the problem. 0×7B errors are a controller/drive error - in other words, a driver issue. You see, when you boot within a virtual environment, everything is virtualized, including hardware. So although I had the correct drivers installed for my hardware, Windows XP was running in a virtual environment with a different set of hardware. Here’s what you need to do:

1) Reboot the machine and boot into your Windows OS natively. After logging-in, you need to create a new hardware profile. Open up the control panel, select System, click the Hardware tab, and click the Hardware Profiles button. Now copy a hardware profile by selecting an existing profile and clicking the Copy button. Give your new hardware profile a name like “Virtual” or something similar.

2) Now that we have a dedicated hardware profile for our virtual environment, we need to prep the system by rebooting the machine once again, and once again boot into your Windows OS natively. However, when you boot into Windows, it should now stop and ask which hardware profile you would like to use. Select Virtual or whatever you called your new hardware profile.

3) Once the system has booted up and you have logged-in, we need to change some drivers, namely those of the IDE controllers by forcing them to be Standard Dual Channel PCI IDE Controller. Go to the control panel, select System, click the Hardware tab, and click the Device Manager button. Now, click the plus sign next to the IDE/ATAP Controllers label. A list of your controllers should now be seen. Begin by double-clicking the secondary controller and then clicking the Driver tab. Now click the Update Driver… button. Select No when asked if Windows Update can be used to find a driver for you. Select Install from a list or specific location (Advanced) and click Next. Now select Don’t search… and click Next. The following page will display drivers that are compatible for your system. You must select the Standard Dual Channel PCI IDE Controller driver and click Next. Repeat these steps for the Primary Controller as well. Usually Windows will tell you that you must reboot for the changes to take affect after you update the Primary Controller driver, be sure to agree to this but as the system reboots, select your Linux OS.

Now that a compatible set of drivers are installed, you should be able to start up VMplayer and successfully boot into your Windows OS. But remember, you must choose the Virtual hardware profile when the system boots within VMplayer and the standard hardware profile when you want to boot natively.

In the next entry, I’ll discuss how to install VMtools - a set of drivers specifically for the the VMplayer/VMworkstation environment that greatly improves performance and adds some pretty cool functionality.

Tags: , , , , ,

WebSVN Installation

If you recently downloaded and installed WebSVN and have followed the Installation Guide only to receive this error:

Please set up a repository path in include/config.php using $config->parentPath or $config->addRepository

See the installation guide for more details

you need to do one of two things.

1) Move include/config.php into the WebSVN root OR
2) Edit include/setup.php by changing:
require_once 'config.php';

To

require_once 'include/config.php’;

For some reason, WebSVN is looking for config.php in the root folder, even though it resides under the include directory by default.

Realtek drivers for Vista

Is it just me, or is anyone else experiencing new Realtek drivers being pushed through Windows Update (Vista) every week or two? It seems every time I update my Vista laptop (Toshiba) I am offered yet a new version of some Realtek drivers - WiFi, ethernet, or audio. Can they not get it right the first time? On the same topic, is anyone else having problems with the default wireless connection reconnecting to the access point after resuming from sleep, stand-by, or hibernation? Every once-in-a-while, I need to “disconnect” from the default connection, then, reconnect in order for it to work again. Annoying. Is this a Vista or Realtek driver issue?

Tags: , , , ,

My IP changed

I woke up this morning and began my daily ritual: cup of orange juice, bowl of cereal, and sat down to check my e-mail. As Outlook loaded on my laptop, I began to notice the “error” icon in the bottom right corner of the window. Thinking I had incorrectly entered my password, I began to read that Outlook was not able to connect to the several domains I have hosted on my mail server.

After checking a few settings and verifying the mail server was indeed up, I reset the router and cable modem but to no avail. Finally, it dawned on me: “Could it be true? After having the same IP address for nearly 5-years, has Comcast finally chnged my IP?” The answer, unfortunately, was “Yes”.

I quickly logged on to dyndns.com (my domain registrar and DNS provider) to update the IP addresses for a half dozen domains that are hosted on my server. After only a few minutes, the changes had propagated and I was back in business again.

Losing my trusty IP has been like losing an old friend - I could always rely on it being there (even after modem reboots.) Let’s just hope this IP change does not become a recurring event or I will have to switch providers.

Tags: , , ,

Yet Another Autoresponder (YAA) installation

I just finished a very grueling installation of a nifty little autoresponder called “Yet Another Autoresponder” (YAA.) The software is Perl based and requires only a few modules which can easily be installed or upgraded via CPAN. However, my difficulties in getting this system working were due to YAA not being able to find the configuration file (yaa.conf). What clued me in to the idea that YAA was not able to find the configuration file was the somewhat ambiguous error message in the maillog:

(Command died with status 1: "/usr/local/yaa/bin/yaa.pl". Command output: Cannot continue, becouse [sic] no lookup maps were defined. )

Looking through the sparse “documentation,” there is no mention of where to put the configuration file. I moved the yaa.conf file to various locations around the file system without any success. Finally, I took matters into my own hands and edited yaa.pl by hand. If you find yourself in the predicament, give this a try:

1) Copy yaa.conf to wherever you want it to reside. I chose the standard configuration path of /etc
2) Edit yaa.pl using your favorite editor and change the following line of code from:

$YAA_DEFAULT_CONFIG_FILE = $module_dir . YAA_SLASH . ".." . YAA_SLASH . "conf" . YAA_SLASH . "yaa.conf";

To:

$YAA_DEFAULT_CONFIG_FILE = "/etc/yaa.conf";

Of course be sure to replace /etc with the path of where you copied your yaa.conf.

After a quick test, I received my autoreponse. Double-checking /var/log/maillog showed no errors or complaints from YAA.

Regular expression for CSV files

After many hours of searching, I found this regular expression to work the best on parsing CSV files:

$expr = “/,(?=(?:[^\"]*\”[^\"]*\”)*(?![^\"]*\”))/”;

Example:

$matches = preg_split($expr, ‘2006-01-01, “Apples, Oranges, and Pears”, $5.95′);

CafeRadius

As some of you know, on Saturday April 1st the first beta test of CafeRadius was unleashed on a small cafe near my home in Seattle. Several weeks prior to this day, I met with the owner of the cafe and gave him a breakdown of the project. He seemed genuinely enthusiastic about it. Although his cafe was relatively new and still building a clientele, he was nice enough to allow me to test the device.

After nearly seven months of development and testing in my own computer lab, I was amazed at how many bugs and “kinks” you can find by testing in a real-world environment.

And the results of the test?
I couldn’t get it off the ground with the networking layout at the cafe. And adding customers to the database of allowed users was not convenient for the cashiers.

So what does this mean?
Certainly not failure. On the contrary, I took the whole experience as motivation to make it even easier to setup, configure, and more extensible on varying network layouts. I also must design an alternate method of adding customers to the user database as some cafes cannot / would not want to deal with the inconvenience of the current system.

In another few weeks I will have these ideas solidified and release another version of the CafeRadius device.

PHP & database sessions

If you have MySQL handle your PHP sessions and are finding that session data is not reliably being read after redirects via PHP’s header function, please read on.

For over a day I had been pulling my hair out trying to figure out why sessions were not sync’ing up after redirects via PHP’s header function. Some pages would load and others would not. I had just finished migrating our code base to a new server running slightly different versions of Apache, MySQL, and PHP - though from the same branches.

After some expirimentation, I discovered sessions handled by the defalt file handler would work just fine - just not reliadbly through my custom database handler. After even further investigation, redirects were working, the data for the session was “late” showing up and by simply refreshing the screen the data would be magically populated in $_SESSION.

After some reading around on the internet and some deep thinking, I understood the problem to be an issue of timing and/or cache timing issues. So, to resolve the issue, I add the session_write_close() command before each redirect I need. It works. Although, do not ask me why.

My LAMP versions:
Linux: RHEL 4.0
Apache: 2.0.52-22.ent
MySQL: 4.1.12-3.RHEL4.1
PHP: 4.3.9-3.9

Hope this saves someone!

Linux + Onboard SATA RAID

Are you considering using the onboard RAID feature of your SATA controller? Before you dive head-on into this project - there are a few things you should know.

Recently, my job took me into territory that was somewhat unfamiliar - the server realm. When I say server, I don’t mean a home server most of us Linux enthusiasts have. I mean a server - dual Opteron, 8GB RAM, and 2 x 320GB hard drives. The kind of server that can handle complex database queries in a matter of a few nano seconds. The kind of server that must be 100% secure and reliable. Our hope was to run the drives in a RAID-1 configuration for maximum stability. For those unfamiliar with RAID, a RAID-1 array mirrors data from one drive to another. This can really speed up disk reads and also gives you a very stable environment when using failover support - i.e. if one drive happens to die on you, the OS will automatically rollover to the backup disk. I had never setup a RAID array before, but felt confident that it could not be too difficult - of course, I was wrong.

The motherboard we selected for our server (a Tyan S2881) has four SATA connectors and a RAID controller. On initial power-up, I entered the BIOS and enabled the RAID controller for the SATA. Once RAID had been enabled, I entered the RAID BIOS and created the RAID-1 array using both disks. Assuming the RAID controller would handle everything else and that Linux would detect it, I continued with my installation of RedHat Enterprise Linux 4.0

I was gravely mistaken. Here is the issue: most newer motherboards that claim to have RAID support, have what is known as FakeRAID - essentially a software RAID. Drivers for these FakeRAID controllers found on most motherboards is not really supported in newer kernels. In my case, a Silicon Image 3114 controller, had a driver in the kernel but only supported the standard SATA protocol and did not enable any of the FakeRAID features of this chipset. Reading on boards and forums around the ‘net, I was informed that disabling the RAID controller in the BIOS and simply using the built-in software RAID within Linux was a much better alternative and was no better or worse than using the FakeRAID for my chipset.

Unsure if these claims were true, I spent some time finding a linux driver for my Silicon Image 3114 RAID controller. The manufacturer had them posted on their website along with installation directions. Half a work day was spent wrestling with these drivers reformating, repartionting. In the end I abandoned the idea of using the onboard RAID controller and proceeded to use the Software RAID option found in RedHat Linux.

After a successful install of RedHat Enterprise Linux 4 onto a RAID-1 array, I found that the boot loader was not correctly installed. If you run into the case where, after a successful install of Linux onto a RAID array, you are presented with simply: “GRUB” at boot up - do not worry. Grab your install CD or DVD and boot using “linux rescue”. Once booted, run:

grub
root (hd0,0)
setup (hd0)

Now reboot and you should be in business. Don’t forget to remove the install CD or DVD from the drive.

Heed my words, unless the RAID controller on your motherboard is a true hardware RAID controller, do not waste your time trying to get the FakeRAID working.