Running OS/2 in a Virtual Machine

Running OS/2, and especially old versions of OS/2, on contemporary hardware is increasingly difficult. Especially large hard drives and modern disk controllers pose a perennial problem. Running OS/2 in a virtual machine is an attractive alternative. The following paragraphs will examine several widely available x86 virtualization solutions and assess their suitability for running OS/2.


Let's get VMware out of the way first, because this part is going to be brief. After testing with VMware Server 1.0.4, my suggestion is not to waste time with VMware if you're trying to run OS/2. I attempted to boot numerous versions of OS/2, from very old to recent, and none of them worked. In all cases the VM froze or OS/2 crashed during the boot sequence. There may be ways to run some versions of OS/2 after tweaking VMware in various unsupported way, but that is pointless because there are better solutions available.

Virtual PC

Now Virtual PC is a completely different story. In VPC 2007, OS/2 Warp 4 FP15 and Convenience Pack 1 and 2 are officially supported guest operating systems. A quick test indicates that OS/2 2.0 and 2.1 also work in Virtual PC. For running 32-bit versions of OS/2, Virtual PC is a good choice, especially because guest additions improving the integration of OS/2 VMs with the host operating system are available.

The story is somewhat different with OS/2 1.x. Virtual PC was unable to boot the install floppy of any OS/2 1.x version I tried. VPC can boot and run OS/2 from a pre-installed disk image, but transferring an OS/2 1.x disk image to Virtual PC is difficult at best.


Disclaimer: I currently work for the company making VirtualBox

OS/2 and VirtualBox is something of a mixed bag. All 32-bit versions of OS/2 run to a greater or lesser degree under VirtualBox, but at this point only when hardware-assisted virtualization is used. On the upside, nearly all CPUs sold in the last few years support this feature.

Like Virtual PC, VirtualBox offers OS/2 guest additions with features like mouse integration and better graphics support. Networking also works quite well in OS/2 guests, using the emulated AMD PCnet NIC. On top of that, VirtualBox is free for personal use.

Things get more interesting with 16-bit OS/2 versions. Starting with VirtualBox version 1.6, it is possible to run unmodified OS/2 1.3, either the SE or EE version from IBM or the Microsoft edition, although there may be problems with installing the OS. OS/2 1.2 may be installed with some tweaking and versions 1.0 and 1.1 currently do not work at all. More about that below.

Problems and Solutions

Running OS/2 inside a virtual machine is more similar to running OS/2 on a real PC than it is different. That means the same sort of problems and solutions apply.

The number one source of problems that OS/2 users (but not just OS/2 users) have faced over the years is storage devices. Growing capacity and performance requirements have resulted in a slow but steady stream of changes. Older operating systems are unable to access storage beyond certain limits, or fail to detect the attached disks altogether.

Fortunately, this is where virtualization solutions can significantly help. Virtual disks can be as small as needed and any 512MB or 2GB or 8GB or other barriers can be neatly sidestepped. Also, virtual machines typically emulate standard ST506/WD1003/IDE/ATA disks, which just about every x86 operating system under the sun can use (OS/2 certainly can).

Another, considerably more difficult problem is CPU speed. This isn't much of a problem for 32-bit versions of OS/2, but it is an issue for OS/2 1.x. Except for the last releases of OS/2 1.3, there are various issues with fast CPUs, typically resulting in traps (SCREEN$ device and others). This happens on real hardware and it happens in virtual machines as well, because they are typically trying to run as fast as possible. It is usually not possible to slow down VM execution so the only resort is patching the offending code.

Yet another source of troubles are device drivers in general. As with storage devices, virtual machines improve things. The guest operating system sees for example standard PS/2 keyboard and mouse regardless of what sort of fancy USB keyboard might be attached to the host machine. Likewise the network adapters emulated by VMs are fairly standard, even though OS/2 1.x is still liable to run into trouble with them just because it's so ancient. Emulated graphics chips provide VBE support, which achieves surprisingly good results with recent versions of OS/2, although old versions are still limited to VGA.

The final source of problems is somewhat - but not exclusively - specific to virtual machine, and that is compatibility with "legacy" hardware standards, although the term "standards" may be a bit misleading here. For example, the oldest versions of OS/2 (1.0 and 1.1) use triple faults as a method to reset the CPU and switch from protected mode back to real mode, a mildly bizarre (or hellishly clever, depending on one's point of view) technique necessitated by the design of Intel's 286 CPU. Neither Virtual PC nor VirtualBox support this, although in theory they could. As an aside, OS/2 1.2 and later prefer to use a 386-specific method to switch from protected to real mode, which is much faster and works well in virtual machines.

The Future Meets the Past

Running OS/2 - and other old operating systems - inside virtual machines is an increasingly attractive option, and in many cases the only option available. Virtualization is getting better (not to mention cheaper) every year and allows users to experience operating systems they might otherwise be unable to even install on their hardware.