Running Windows 2000 on WSL

As I have mentioned here before QEMU is a great way to emulate old hardware to explore vintage operating systems.

QEMU runs on both WSL and WSL2 on Windows 10.

Install Ubuntu on WSL if you have not done so already. More help for this on the Ubuntu Wiki.

Install and run an X client on Windows like X410, VcXsrv, or Xming and configure your DISPLAY variable in WSL.

On WSL1:

$ echo 'export DISPLAY=:0' >> .bashrc
$ source .bashrc

On WSL2:

$ echo "export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0" >> .bashrc
$ source .bashrc

Procure a Windows 2000 ISO image. You may need 7-Zip for working with 7z files on Windows or you can use 7za on the command line in WSL.

Install QEMU in Ubuntu on WSL:

$ sudo apt install qemu

Next we need to create a virtual hard drive to install Windows onto, a C:\ drive:

$ qemu-img create -f qcow2 windows2000.qcow2 5G

qemu-img will create an VM hard drive image file named windows2000.qcow with a maximum capacity of 5GB. The initial file size of windows2000.qcow will be <1MB because it is expandable, the file size will increase as you write more data to the image, up to the maximum of 5GB we set. qcow2 is the native image format of QEMU, the type of file we are creating, so qcow2 makes a useful extension.

Move your Windows 2000 ISO over to your WSL container for maximum performance:

In my case this was:

$ cp /mnt/c/Users/Hayden/Downloads/Microsoft\ Windows\ 2000\ Professional\ (5.00.2195.6717.sp4)/EN_WIN2000_PRO_SP4.ISO .

Your path may vary based on your username and ISO location.

Next we will boot QEMU with settings for installation. This means we need to be booting from the CDROM:

$ qemu-system-i386 -hda windows2000.qcow2 -cdrom EN_WIN2000_PRO_SP4.ISO -boot d -m 1024 -vga cirrus -localtime

This command runs the i386 QEMU emulator, assigns windows2000.qcow2 as "hda" or Hard Drive 'A', the first hard drive, assigns our ISO as a cdrom, tells QEMU to boot from the cdrom, assigns 1024 MB, or 1 GB, or RAM to the emulator, we specify the Cirrus virtual graphics card, and to use the system clock as local time, not GMT.

Then we install Windows 2000 on our hard drive after formatting the blank 'C' drive inside windows2000.qcow2:

Pro-Tip: If your cursor gets stuck inside the QEMU image, use Ctrl+Alt to escape.

When restarting, we need to modify our settings. We don't need to boot the ISO image. If you boot back into the blue-screen text-only setup, just exit.

We can now start QEMU and our new install with the following:

$ qemu-system-i386 -hda windows2000.qcow2 -boot c -m 1024 -vga cirrus -localtime

You can enlarge the display by increasing the display resolution:

It is possible to add a network card to your QEMU install and access the internet from your VM. I do not recommend this without security software in place. There are known exploits for older operating systems in the wild that have not been patched and never will be. To proceed anyways:

$ qemu-system-i386 -hda windows2000.qcow2 -boot c -m 1024 -vga cirrus -localtime -net nic,model=rtl8139 -net user

I recommend keeping the ISO around for drivers you may need, like a network card. To boot QEMU with an ISO in but not booting, specify drive 'c' after -boot:

$ qemu-system-i386 -hda windows2000.qcow2 -cdrom EN_WIN2000_PRO_SP4.ISO -boot c -m 1024 -vga cirrus -localtime

Lets say you wanted to try Microsoft FORTRAN PowerStation:

Repeat the process of downloading, unpacking, and copying over the ISO:

And use the non-booting command substituting the application ISO for the Windows 2000 ISO:

$ qemu-system-i386 -hda windows2000.qcow2 -cdrom EN_WIN2000_PRO_SP4.ISO -boot c -m 1024 -vga cirrus -localtime

These steps can be applied to any operating system you may want to try.

I also tried Visual Basic 6.0:

You can see that windows2000.qcow2 has grown to 1596 megabytes:

With other operating systems you may need to tweak the hardware configuration, use floppies to boot, or run a different platform altogether than i386 or x86_64.

To learn more about QEMU you can use the man pages built into Ubuntu on WSL:

$ man qemu-system-i386