VMs and Old OSes

Here are a few things I’ve found running VMWare 6 to host my main work environment:

Win2K and large SATA drives

I initially started using Win2K as the host environment for the VM, given it is more lightweight than XP. I found that even Win2K SP4 didn’t see my entire 300GB drive, instead cutting it short at 139GB. This is both in the installer and the drive manager once installed.

Fortunately I had just started and didn’t have any partitions set up yet. Turns out that out-of-the-box Win2K does not see large partitions and it would have corrupted any large partitions had it mounted them. Its fixable by creating this registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\atapi\Parameters\EnableBigLba [DWORD] = 1

Guess not enough people have corrupted large drives under 2K for MS to make this a default in a hotfix. In any case I wouldn’t like to install Win2K cold on a large drive with existing partitions on it, by the time you get to hack the registry, the other partitions might be trashed.

Dropped network transfers

I persisted with Win2K and soon discovered the networking between the guest VM and the host (bridged mode) was really flaky; large file transfers would fail inexplicably with silly errors. It turns out that Win2K’s networking was freaking out because data was flowing between the VM and the host at speeds faster than the physical “real” interface (100mbit) could support. Win2K has some kind of “check” for this which fires even though the data isn’t actually going over the physical interface.

The fixes for this included hacking in a new virtual ethernet adapter for VMWare (which bridges at the MAC level) and using a separate “host only” adapter for the guest-to-host sharing. The second way worked fine but I decided to give up on 2K as a host and went back to XP as the host OS.

Big differences between Uniprocessor and Multiprocessor Win2K VM HALs.

My guest VM is Win2K and I initially installed it with one CPU enabled under VMWare, so it installed a Uniprocessor kernel/HAL. All worked great so I thought it might be good to try a dual CPU VM. Adding the CPU isn’t enough, you have to use Device Manager in the guest to change the computer from ACPI Uniprocessor to Multiprocessor (update the driver, manually select the alternate HAL). This enabled the VM to see multiple CPUs but I noticed something very nasty.

Running Winamp or ZoomPlayer now used 100% of both real cores. Changing the VM back to a single virtual CPU (still with a multiprocessor HAL) just meant I now had one real core maxxed out. After I switched the VM back to the ACPI Uniprocessor HAL (device manager again) it now uses a couple of percent for Winamp and about 15% for 640×480 video stretched to 1280×1024, like I’d originally observed. Not bad if you remember its a VM!

I guess the multiprocessor HAL needs more of VMWare’s attention to manage when doing I/O, even with a single virtual core.

No ActiveX, No Internet for you

A couple of weeks ago, when I arrived here in Seoul, we had a tech come out to connect broadband. The building is on fiber and the hardware side of the connection just involved patching the existing RJ45 wallplate to the building’s router rather than the phone line.

The software side was a bit of a shock to me; the tech installed 4 ActiveX controls as part of the connection process. After he left, I looked closer at what was going on.

When the building router senses a new ethernet MAC address, it requires you to authenticate. Any URL you enter redirects to a login page. The kicker is that the login requires an ActiveX control to be installed, into which you enter your national ID card # and your phone number. (Not so much authentication as a reminder that everything you do is traceable to YOU).

Had I been running on a Mac or Linux without Windows, it would have been a show stopper. Those OSes simply dont matter here, its Windows or its nothing.

The other controls he installed included an “IP checker” and a speed tester.

I’ve since set up a new computer here and also bought a router. We had to reactivate the link again (for the router’s MAC address) but I made sure we did it in a VM this time so I could Snapshot whatever it installed away.

I notice that the IP address assigned to me hasn’t changed since I got here a few weeks back, even after disconnecting and reauthenticating. The net is working fine, I get 90mbits in and out to sites within Korea; the international link is nowhere near that capable. I usually achieve about 1MB/sec for Gutsy updates from a server in Japan. USsites are about 400KB/second. Australia is about 200KB/second on a good day.

It seems the reason ActiveX is so prevalent here is because the Korean government mandated it for e-commerce years back when trade restrictions prevented the export of strong crypto, so the Koreans developed all their own. Some banks install a half dozen ActiveX controls, sometimes ocnflicting with controls installed by other banks. One even installs its own firewall. Thanks.

We now use VMWare virtual machines to avoid clagging up the host system.

What does that button do?

I bought a new computer system here in Korea and got a basic keyboard with it, a standard 104 key thing with a few extra buttons which I’d assumed were multimedia buttons. The keyboard did not come with any software and when I pressed the buttons, I was quite surprised to see Korean web sites pop up, which of course tried to install ActiveX plugins (this place lives on ActiveX, but thats another story).


The pages opened even in a fresh OS install VM, so I knew it wasn’t any driver doing it. Closer scrutiny has shown whats happening.

The keys are hard-coded to send “Windows-R” (opens the Run dialog box) followed by some URLs which are basically typed in by the keyboard.

No idea if the keys are reprogrammable; it would involve the keyboard reflashing itself and given their labels, I kind of doubt it.

The URLs of the keys are:

www.sky-lotto.com, www.weminplus.com, www.gazone.co.kr and www.hozone.co.kr

which redirect (probably to the highest bidder).

Glad I’d set up firefox as my default browser before pressing those keys.

Was thinking I could make them go somewhere useful using my host file but I discovered that the keyboard’s timing is a bit quick when I have a lot of VM stuff going on and sometimes the Run dialog hasn’t opened before it sends the other keys, leading to a lot of beeping.

Apache’s transfer speeds

Being away from home, I’m downloading programmes recorded by the HTPC over the internet. I set up a batch file that uses WGET to retrieve the compressed WMVs that get created from recorded programmes. Its the same Apache server thats serving this blog.

Even though my uplink is 256kb (30KB), I’m very disappointed to only get about 12KB/s using wget. I’ve also tried direct downloads in Firefox, same thing.

If I use PHP File Manager instead though, I achieve 26KB per second. Unfortunately I cant automate this method easily.

So it seems Apache is being very conservative with its use of the link.

I thought it might have something to do with the long latency from Korea to Australia (nearly 400ms) so I tried increasing the receive window size, right up to 87600. This is supposed to reduce the frequency of ACKs and improve things over a high latency link. Didn’t help.

I’m guessing that Apache is doing some kind of connection load balancing which is annoying. Might be interacting with Windows XP’s QoS packet scheduler. Dont want to mess with that remotely at this stage; some connectivity is better than none… if I kill the network interface,

SIP phone fun

Wanted a local dial in number that would ring on my laptop. Went with Pennytel as their untimed international calls (8c) sounded good. Getting it to work ended up being much harder than it should have and took $20 of landline calls to my DID number.

The basic problem was that my outgoing audio was not heard by a caller to my DID number. It wasn’t a port problem nor an audio hardware problem; the voicemail system could hear me fine, (determined after a lot of wasted calls).

Their tech support guy was responsive and I went through the process of trying a number of SIP clients (he preferred X-Lite) on a couple of XP computers with different audio hardware.

A couple of colleagues had the same problem under XP but one got it working on a hardware SIP phone. I tried a complete WinXP reinstall. No dice, even with a totally fresh install.
Finally had a breakthrough when I discovered it worked fine on my Win2K computers. This eliminated a local network/router/ISP problem.
I used Ethereal to capture packets during a test call; data was flowing in both directions. Sent the data to Pennytel and their tech support (Antony) came back with the solution; try with just the G711 ALaw codec enabled. I tried this in Bria and it came good. Seems something in XP breaks that codec when using it with Pennytel!  You’d think they would have known about this.

EDIT April 2009: Nearly 2 years later and I’ve been using Pennytel using my SPA3102 ATA. Now I’m wanting to have Bria available on my laptop again. I installed version 2.5, the very latest and again had outgoing audio problems on incoming PT calls.

Using settings->Audio Codecs I just left G711-alaw in there but it didn’t help. Then I checked the “when negotiating audio codecs, accept the first codec offered”. Its all good now.

Telephone Switcher

Component side

Soldering SideWhen I travel I thought it’d be good to have a way to remotely reset/reboot the HTPC and the ADSL router. The HTPC is on a UPS but the router isn’t, which probably explains why the router’s locked up a couple of times after the lights have flickered here. Living on a site with houses still being constructed, who knows what can happen.

I bought and built the K140 telephone switcher kit from www.ozitronics.com

You connect it to a standard phone outlet and it lets you dial into it and turn relays on and off using simple commands on your phone keypad. I’ve connected one relay accoss the power button of the HTPC, rather than the reset switch. This lets me switch it completely off and on again (which might be useful if we have a long power failure while I’m away).

Switcher in use

I’ve now got the second relay in series with the low voltage side of the router’s power brick (using the normally closed relay contact) so I can also power cycle the router if it becomes non responsive. With it now on the UPS, hopefully this wont be needed very often 🙂

Up and away

My HTPCWell, got this blog up and going. Its running on my home theatre PC, a Pentium 4 3GHz with 1GB of RAM.

The HTPC has a couple of TV tuner cards and runs DVB Webscheduler. I’ve set up a couple of scripts to convert recorded programs into WMV files which I can then download over the net when I’m travelling.

Here’s a page on the HTPC which I wrote when I built it.