In the past, I have covered how to set up Ubuntu in WSL2 and hosting local LLMs with Harbor, now I want to migrate my Harbor instance from baremetal Linux into WSL2 so that I don’t have to set it up from scratch.

First thing to do is to open firewall port

netsh interface portproxy add v4tov4 listenport=33811 listenaddress=0.0.0.0 connectport=33801 connectaddress=172.xx.xxx.xxx

On Linux hardware: copy Harbor files from

/home/username/Harbor
/home/username/.ollama

On Windows hardware: connect the USB drive containing Harbor files and run

wmic diskdrive list brief
wsl --mount \\.\PHYSICALDRIVE1 --partition 2

Now the USB drive should be mounted under /mnt/wsl/PHYSICALDRIVE1p2, copy files using WSL cli

sudo cp -pur /mnt/wsl/PHYSICALDRIVE1p2/home/username/.ollama /home/username/
sudo cp -pur /mnt/wsl/PHYSICALDRIVE1p2/home/username/harbor /home/username/

Unmount with

wsl.exe --unmount \\.\PHYSICALDRIVE1

Update and start Harbor

cd /home/username/harbor
./harbor.sh ln
git pull
harbor pull
harbor update -l
harbor --version
harbor up

Check instantce with http://localhost:33801/ locally and http://ip:33801 from LAN

Check GPU with nvidia-smi -l 1 under Windows Terminal