A.I.

Install Private-GPT 0.2 on Windows Server 2019/2022

Total time is about 30min, depending on your hardware and internet connection.
This will install PrivateGPT on a Windows 2019/2022 machine and run everything (including the LLMs) locally. After installation, no further Internet connection required for most operations.

Install the following pre-requisite software:
Git from https://git-scm.com/download/win
Python 3.11.7 from https://www.python.org/downloads/release/python-3117/
Cmake from https://cmake.org/download/

If you’re using a Nvidia GPU, also install:
MS Visual Studio Community 2022 from https://visualstudio.microsoft.com/vs/community/
Nvidia cuda_12.2.0_536.25_windows.exe from https://developer.download.nvidia.com/compute/cuda/12.2.0/local_installers/cuda_12.2.0_536.25_windows.exe

Open an administrative Powershell window and type:
c:\git clone https://github.com/imartinez/privateGPT
pip install poetry
python.exe -m pip install –upgrade pip

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString(‘https://community.chocolatey.org/install.ps1’))

choco install make
poetry install –with ui,local

The following may take a while:
poetry run python scripts/setup

To enable PrivateGPT to use the Nvidia GPU, type:
$env:CMAKE_ARGS=’-DLLAMA_CUBLAS=on’; $Env:LLAMA_CUBLAS=”1″; $Env:FORCE_CMAKE=”1″; poetry run pip install –force-reinstall llama-cpp-python

Add some file processors for .docx, .html, ebooks, sound:
poetry add docx2txt ebookLib html2text whisper

Start the Private-GPT with:
make run

If all went well, after a minute, you’ll have an output that shows something like:

Open a browser on the machine that Private-GPT was installed on and type:
http://localhost:8001

Note: To remove uploaded files, stop the server and type:
make wipe

Server 2016

Update or Install missing drivers on Windows Server Core 2016/2019 for free

Install Drive Easy Free from:
https://www.drivereasy.com/download-free-version/

Start DriverEasy from

“C:\Program Files\Easeware\DriverEasy\DriverEasy.exe”

Scan the machine and pick the driver you need from the list and download it.

In the command prompt, cd to folder:

c:\users\<username here>\Appdata\Roaming\Easeware\DriverEasy\Drivers\

To find the driver you just downloaded, type:
dir *.inf /s/b
CD to that directory and type:
pnputil -i -a *.inf

Note: DriverEasy will crash after ever single download as it does not have a GUI to fall back on, so, unless you want to spend a lot of time restarting DriverEasy, only bother with the drivers you really need. I usually only bother with storage and network drivers.
Also, if you happen to have core installed on a laptop with integrated hardware like webcams, etc. these drivers will have issues installing as the underlying infrastructure is missing

Hyper-V

Windows 2000 on Hyper-V

Sometimes it’s necessary to install an old Operating System, but you really cannot (or don’t want to) get the old hardware out, even if it would still work.
I was in such a position that I had to install Windows 2000 Server. After locating the installation media, I decided it was a good idea to get it running on the 2019 Hyper-V cluster. This actually can be done, but there are a few hoops to jump through:

– The base VM must be setup with a legacy network card.
– Also the vCPU must be set to legacy mode for this VM.
– The Windows 2000 installation media must have SP4 slipstreamed.
If SP4 is not slipstreamed into the installation media, setup will not even properly start, but will Blue Screen with:

STOP: 0x0000001E (…) KMODE_EXCEPTION_NOT_HANDLED on the driver acpi.sys

If you don’t have the original installation media with SP4 installed, you can download SP4 from WinWorldPC and slipstream yourself as explained here.

Creating the VM
This part is pretty much the standard process. I’ve named my VM: Windows 2000 Adv En, Generation 1 VM type, Startup Memory of 3072MB and make sure Dynamic Memory is turned off. Also leave the network card as Not Connected. (We’ll connect the NIC in a later stage)
Note: I’ve put the RAM to 3GB as Windows 2000 is a 32bit operating system and is not capable of addressing much more without some PAE trickery)

Create a new virtual hard disk. For Windows 2000 you don’t really need a lot, so I gave it 20GB. A lot more than it needs, but it doesn’t really matter. A fixed size seems to be the fastest for the installation, as the formatting of the disk during setup seems faster. Make sure you create a VHD and not a VHDX. The OS intermittently Blue Screens after the installation of the storage drivers when a VHDX is used.

Next remove the SCSI controller. Windows 2000 does not support this SCSI controller and will Blue Screen with:
STOP: 0xC0000263 {Driver Entry Point Not Found} The \SystemRoot\system32\DRIVERS\storvsc.sys device driver could not locate the entry point ZwQueryFullAttributesFile in driver ntoskrnl.exe.

On the install options tick the box to install an operating system from a bootable CD/DVD-ROM, select Image File and browse to where the Windows 2000 iso is stored and click finish.

Enable legacy settings

The following step is to enable the vCPU legacy compatibility for Windows 2000. So open up Powershell in administrator mode and enter:

Set-VMProcessor <VM Name Here> -CompatibilityForOlderOperatingSystemsEnabled $true

So in my case I type:

Set-VMProcessor “Windows 2000 Adv En” -CompatibilityForOlderOperatingSystemsEnabled $true
(Notice the quotes. These are needed if you have spaces in your VM name)

If you need network access, you need to setup a legacy network adapter. In the Hyper-V manager select Settings for your VM and select Network Adapter. Click the Remove button. Now click on Add Hardware and add a Legacy Network Adapter. The NIC will stay disconnected if you don’t specifically connected to the virtual switch in the settings of the Legacy Network Adapter. If you have any further network configuration, like named vLANs, you can set these there.
Note: Since Windows 2000 (and this goes for Windows NT3.51, NT4 and 2003 as well) has not had any security patches for years and these were not known for a robust security to begin with, be very careful connecting a legacy VM like this one to the internet. Take extra steps to protect your network in these times of ransomware and other malicious software.

From here you can follow the normal setup process for Windows 2000 and this should succeed. During the setup of the operating system, the mouse is not going to be available. You will not be able to immediately add the server to a domain during setup either. The reason for this is that Server 2019 does not offer Windows 2000 compatible integration services. These will have to be installed manually after setup completes.
The latest installable integration services that will install most drivers on Windows 2000 are the vmguest.iso is for Windows Server 2008R2 (Linked below), but the 2008 version will work. Unfortunately Microsoft no longer officially hosts these on their webpage.

Various versions of the VM Guest tools:
Hyper-V2008-vmguest.iso
Hyper-V2008R2-vmguest.iso
Hyper-V2012R2-vmguest.iso

Product Keys for Windows 2000 (Taken from WinWorldPC):

Professional: RBDC9-VTRC8-D7972-J97JY-PRVMG
Server: H6TWQ-TQQM8-HXJYG-D69F7-R84VM
Advanced Server: WY6PG-M2YPT-KGT4H-CPY6T-GRDCY

Hyper-V

Force Remove Host from SCVMM 2016/2019 & Hyper-V Console

To remove from SCVMM:

Open Powershell with administrative credentials:

PS C:\> $Credential = Get-Credential
PS C:\> $VMHost = Get-SCVMHost -ComputerName “<Hostname of Server here>”
PS C:\> Remove-SCVMHost -VMHost $VMHost -Credential $Credential

The Get-Credential cmd-let will open a prompt in which you have to supply credentials with the rights to remove the host. In the second line you specify the server. This doesn’t have to be the FQDN, the Netbios name will do.
The last line actually removes the server. This may take a few minutes, depending if the server responds or not. If the server does not respond, Powershell waits for a time-out.

To remove from a Hyper-V console:

Open Powershell with administrative credentials:

PS C:\> Get-VM
PS C:\> Remove-VM -name [“VM Name Here”] -force

Use this to remove VMs that are in the state of SavedCritical. The “Get-VM” command will show a list of VMs registered on this Hyper-V server. The Saved-Critical VMs will list there too. Make sure the -force is added or it won’t do the trick. If your machine name has spaces, use the quotes (without the square brackets of course].

This was tested on Server 2016 and Server 2019. It’s also expected to work on later server releases.