
What you need:

* A Windows NT 3.1 ISO (obviously)
* A Windows NT 3.1 boot floppy
* ATAPI.SYS floppy
* AMD PCnet drivers

Once you have everything you need, create a new virtual machine and set it to Windows NT when it asks you to.
The defaults set by VirtualBox are fine but you will need to add a floppy controller with a floppy drive (strangely
enough this is not added automatically).

Before you first start the virtual machine (this is important), open a command prompt on the host and navigate
to the folder where VirtualBox is installed. There, type in this command (thanks to OS/2 Museum for this):

VBoxManage modifyvm "Windows NT 3.1" --cpuidset 1 00000543 00000800 00000209 078bf1bf

Replace "Windows NT 3.1" with whatever you called your virtual machine. If you don't do this, you will screw
yourself over when the graphical portion of Setup starts and have to restart from the beginning again with lots of
wasted time.

Start the virtual machine with the boot floppy inserted. Windows Setup will start. Choose Custom Setup when it
asks you to. Windows NT will detect no SCSI drives, press S at this point and insert the ATAPI.SYS boot floppy
linked above. Setup will load it and detect the CD-ROM drive. Create a partition, choose whatever you want (the
NTFS conversion consistently fails for me for some reason so might as well stay with FAT). Setup will run through
and switch over to the graphical portion.

Once in the graphical portion of Setup, you will eventually reach Network Setup where Windows NT will detect no
network adapters. Continue to select a custom adapter, scroll all the way down to <Other> and insert the AMD
PCnet driver floppy to continue (for reference the NT drivers are found under A:\WINNT if you use my linked floppy
image).

Remove NetBEUI and install TCP/IP. Since Windows NT 3.1 is completely brain-dead it has no DHCP support, which
means you will have to manually set an IP. If you use the NAT option under VirtualBox (which is the default) the
gateway is 10.0.2.2 and your own IP should be 10.0.2.15 (or anything higher than that), subnet mask is
255.255.255.0. Note that Windows NT 3.1 seemingly does not like VirtualBox's implementation of DNS so you will
be unable to use DNS this way, which means that you can't access sites like Google. Scroll to the end for a
different solution.

The rest of setup is easy and you should end up with a basic installation of Windows NT 3.1.



Further work after installation:

* You will most certainly want to install a graphics card driver so you have more than 640x480. There's a
VirtualBox universal driver in disk image "videomp3.img". Before you install this driver, you need
to install framebuf.dll from the Windows NT CD (included). Then go to Windows Setup, choose to install a different
 display adapter, go to Other, select the floppy, choose the desired
screen resolution and color depth, and click Ignore when an error about framebuf.dll comes up. Do this before
installing Service Pack 3 or you will be in serious trouble.

* You will have noticed that getting files to the virtual machine is hard because Windows NT 3.1 has no browser
whatsoever and the most primitive implementation of FTP ever (and of course, no working DNS when you use
VirtualBox's NAT). There are various ways around this. The way that I personally chose is to set up a second
virtual machine with Windows XP, give it a second network adapter, change this network adapter to connect to an
Internal network, then change the Windows NT 3.1 VM's network adapter to also connect to the same Internal
network. You can then use Internet Connection Sharing on the XP computer to bridge the two adapters (see
Q306126 from my Knowledge Base Archive for exact instructions). The Windows XP computer will automatically
assign itself the IP 192.168.0.1 so if you go this route the NT 3.1 computer will need an IP from that range (e. g.
192.168.0.100). Don't forget to change the gateway and the DNS server to 192.168.0.1 (DNS is hidden under the
Connectivity button, select "First DNS, then HOSTS" and then add the DNS server IP to the first listbox you see).
The advantage of this is that since XP has folder sharing, you can comfortably move any files from the host via XP
over to NT 3.1 using the administrative share C$.
You could also just use bridged networking to join the host computer's network and allow direct connectivity with
the host if you have that installed (but I don't like it because it clogs my router's DHCP with virtual machines). If
you do not have bridged networking installed the above solution is the best.

*Now, you should install Service Pack 3 to update Windows NT 3.1 to the newest version. You then have the basic
things set up.

* The ATAPI.SYS from the boot floppy will fail on ISOs smaller than 150 MB, to circumvent that you have to replace
scsicdrm.sys and scsiport.sys with the versions from build 438 (included).
Do this after installing Service Pack 3 because otherwise the files will be overwritten again by the
Service Pack installer.

*If you want you can replace NTLDR and NTDETECT.COM on the hard drive with the versions from Windows NT
3.51. This allows you to access memory beyond 64 MB.

*Also install the Resource Kit so you get Process Viewer which is the closest to a Task Manager you're ever gonna
get for NT 3.x.

* You can install sound if you want using the driver that ships with NT 3.1 but it sounds really terrible under
VirtualBox. I'd skip it. The official Soundblaster 16 driver does not work with VirtualBox (I've tried)



Anything beyond that is entirely your choice.

As for applications, there really isn't much to NT 3.1 applications, because there are so few.

* You can install Visual C++ 1.0 if you want to compile applications yourself. It's really the only compiler you have
besides the official SDK/DDK.

* As for a browser, you're best off just using a 16-bit browser such as Netscape 4, it's really not that good but
better than nothing.

* Windows NT 3.1 has a built-in FTP Server that is well-hidden as an optional component in the Networks section.
You can also get the EMWAC server that is sort-of an IIS precursor (it took me ages to find the NT 3.1 version on
the Internet, it's really hard to find). Someone also managed to compile Apache 1.3.8 for NT 3.1 which has
HTTP/1.1 and is just overall better if you want to be actually serious about the HTTP server.

* SQL Server 4.21 is an easy choice, don't forget Service Pack 4.

* Other things are scarce. There's WinZip 5.5 beta, there's Tetris, and that's more or less it. Supposedly Systems
Management Server was released for Windows NT 3.1 at some point but we don't have that yet (do we?).



EDIT: I realized that you can't actually download the EMWAC server for Windows NT 3.1 anymore. It seems to
have disappeared from the Internet. Since I might be the last person to have this little gem I'll share it for
preservation purposes: https://drive.google.com/open?id=1bC8e1eRJR_YlDg2jHkPk-uKxU-mQWoXy



One last warning that I feel is appropriate here:
If you for some reason decide to install NT 3.1 on the Buslogic adapter (instead of using IDE as in my
tutorial), do not for whatever reason choose the NTFS conversion.

If you do, Windows NT 3.1 will screw itself over at the conversion part and leave you with a broken partition. All
you can do at this point is start over from the beginning.

A safe way to use NTFS, for both IDE and the Buslogic adapter, is to create two partitions in the text-mode portion
of setup. Install NT on the first partition (and format it with FAT) and leave the second unformatted. Once NT is
installed, you can use format on the command-line to format the partition as NTFS, e. g. format d: /fs:ntfs.
Having NT on an NTFS partition legit is probably possible but so sophisciated that it's easier to not bother,
because the only thing that can format NTFS that NT 3.1 understands is... NT 3.1. So you'd need a second
installation to create an NTFS partition on the first and then install NT in the already formatted NTFS partition. Or
something like that, at least.



One thing I want to add:

If you noticed, Windows NT 3.1 has a slight problem with disk corruption on VirtualBox, which makes it likely that
sooner or later, the system will refuse to boot with the error:

The following file is missing or corrupt:
\winnt\system32\config\SYSTEM

Here's the trick: Windows XP (it has to be Windows XP, older Windowses don't work) can repair NT 3.1 registry
hives!

All you need to do is copy the registry hive over to a Windows XP virtual machine. Preferably, NT 3.1 is installed on
a FAT partition, so you can use an MS-DOS bootdisk and copy the SYSTEM hive to an empty floppy which XP can
read.

You can then open regedit on Windows XP, select a hive like HKEY_LOCAL_MACHINE, then go to File -> Load Hive,
select the NT 3.1 SYSTEM hive, choose any name (say, "winnt31"), and XP will give a short message that the hive
had to be recovered.

At this point, do any change (just add a key or something) to force Windows to write the hive, then do File ->
Unload Hive and copy the file back to the Windows NT 3.1 virtual machine, overwriting the existing SYSTEM hive.
And lo and behold, NT 3.1 will boot again!

https://www.betaarchive.com/forum/viewtopic.php?f=39&t=38423
