Machine Setup
These instructions are for the initial setup of each machine that is intending to run Porta On Prem.
WSL Setup and Ubuntu Installation
-
On a device that has internet access, download:
-
Copy the downloaded files to the machine being installed
-
Ensure that the machine has installed any pending Windows updates
-
Open the Windows start menu, search for
Windows Features
, and selectTurn Windows features on or off
-
Enable the following features if they are not checked already:
- Virtual Machine Platform
- Windows Subsystem for Linux
-
Reboot the machine after enabling these features
-
In the files you downloaded and transferred to the machine, double-click
wsl_update_x64_XXXXXX.cab
to extract the WSL2 kernel .msi file -
Run
wsl_update_x64.msi
to install the WSL2 kernel update- If your machine is already more-up-to-date than 5.10, this step may not work. Continue to the next step.
-
Open powershell as administrator
-
In powershell, run
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
-
In powershell, run
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
-
Double-click
wsl.2.0.14.0.x64.msi
to update WSL to version 2.0.14- If your machine is already more-up-to-date than 2.0.15, this step may not work. Continue to the next step.
-
Reboot the machine
-
Open powershell as administrator
-
Run
wsl --set-default-version 2
-
Check your WSL version with
wsl --version
(orwsl --status
)- the WSL version should be 2.0.14 or higher
- the Kernel version should be 5.10.102.2 or higher
-
Install the Porta Ubuntu image
-
Run
wsl --shutdown
-
Run
wsl --import Ubuntu-20.04 Ubuntu %USERPROFILE%\Downloads\Ubuntu2204-WSLimage.tar
- Replace
%USERPROFILE%\Downloads\Ubuntu2204-WSLimage.tar
with the path to the downloaded Ubuntu WSL image, if needed
- Replace
-
The import may take a few minutes to finish
-
The initial WSL ubuntu login will be with the
root
user. We need to set default user by creating a config file and updating it -
Open the WSL command line interface by running
wsl
in powershell -
Run:
-
Run
exit
and in powershell, runwsl --terminate Ubuntu-20.04
. -
When you open wsl again it should be as the
px
user
If you have issues using the Porta image, see the Stock WSL Ubuntu Image Installation section below, then return here to run the following steps after the stock image is installed.
-
-
After distro install completes, in powershell, you should see
Ubuntu-22.04
listed if you runwsl -l -v --all
- If you aren’t seeing
Ubuntu-22.04
listed, try checking the distro in use by starting WSL and checking the OS version by runningwsl
in Powershell, and then runningcat /etc/os-release
. The output should look something like:
- If you aren’t seeing
-
Reboot the machine
-
Reopen powershell as administrator
-
Double-check your install:
wsl --status
, you should see:Default Distribution: Ubuntu-22.04
Default Version: 2
- If you receive “WSL2 is not supported with your current machine configuration” then you need to enable virtualization in the BIOS. This process will vary depending on your machine.
-
Make sure Ubuntu is using WSL2 by running
wsl -l -v --all
this should look something like: -
Ensure Ubuntu is used as the default distro by running this command in Powershell:
wslconfig /s Ubuntu-22.04
-
You can confirm by running
wsl --status
again, orwslconfig /l
-
Now you can move on to the Docker installation.
For more details, see the Official Microsoft WSL manual install instructions.
Stock WSL Ubuntu Image Installation
- Rename the Ubuntu AppxBundle extension from
.AppxBundle
to.zip
- Extract this zip archive
- Inside the extracted folder, use the file with the name ending in
_x64.appx
in the next step (likelyUbuntu_2204.1.7.0_x64.appx
) - Open Powershell as administrator, navigate to the folder containing the .appx and run the following command in that directory, where
app-name
is the name of the Linux distribution.appx
file:Add-AppxPackage .\Ubuntu_2204.1.7.0_x64.appx
- Once the Appx package has finished, you can start running the new distribution by running the following steps (The command
wsl -l
will not show that the distribution is installed until this step is complete):- Add your Linux distribution path to the Windows environment PATH (C:\Users\Administrator\Ubuntu in this example), using PowerShell:
- In powershell, run
ubuntu2204.exe
. This will begin installing the Ubuntu 22.04 distro and prompt for user setup. - When prompted for a username and password, enter a new username and password (this user will have
sudo
aka admin permissions)- The username must contain only lowercase letters, underscores, and dashes
- Do not proceed with the
root
user, this is a security risk and will cause issues with the installation
- Resume the instructions at Step 18 above in the WSL Setup & Ubuntu Installation section.
Docker
Download and install Docker Desktop for Windows, version 4.28.0:
Follow the installer instructions for WSL2 backend and, when prompted in docker, ensure the Use WSL 2 instead of Hyper-V option on the Configuration page is selected.
After installation is complete, open Docker Desktop and ensure it is running, then proceed with the following:
-
Set Docker Desktop to start on login
- In the top right menu bar, click the gear icon to open settings
- Select the left sidebar’s “General” tab to pull up the General settings
- Check the box “Start Docker Desktop when you log in”
- Also Uncheck:
- Send usage statistics
- Show CLI Hints
- SBOM Indexing
- In the bottom right, click “Apply & Restart”
- Using the inner “X” icon in the top right, close the Settings menu
-
Disable Resource Saver in Docker Desktop Settings
- In the top right menu bar, click the gear icon to open settings
- Select the left sidebar’s “Resources” tab
- Uncheck the box “Enable Resource Saver”
- In the bottom right, click “Apply & Restart”
-
Disable Updates in Docker Desktop Settings
- In the top right menu bar, click the gear icon to open settings
- Select the left sidebar’s “Software updates” tab to pull up the updates settings
- Uncheck the box “Automatically check for updates”
- Uncheck the box “Automatically download updates”
- In the bottom right, click “Apply & Restart”
-
Disable Extensions in Docker Desktop Settings
- In the top right menu bar, click the gear icon to open settings
- Select the left sidebar’s “Extensions” tab
- Uncheck the box “Enable Docker Extensions”
- In the bottom right, click “Apply & Restart”
-
Disable Beta Features in Docker Desktop Settings
- In the top right menu bar, click the gear icon to open settings
- Select the left sidebar’s “Features in Development” tab
- Uncheck the box “Enable WASM”
- Uncheck the box “Enable SOCKS proxy support”
- In the bottom right, click “Apply & Restart”
-
Disable Notifications in Docker Desktop Settings
- In the top right menu bar, click the gear icon to open settings
- Select the left sidebar’s “Notifications” tab
- Uncheck ALL items in the list
- In the bottom right, click “Apply & Restart”
-
Using the inner grey “X” icon in the top right, close the Settings menu
-
Set up the Windows user to auto-login
- A sales engineer, support engineer or IT specialist may need to help with this step
-
Open the
hosts
file as administrator in Windows (Located inC:\Windows\System32\drivers\etc
)- This is often most easily done by opening the start menu and typing
notepad
to search for the Notepad application - Right-click the Notepad application and select “Run as administrator”
- This is often most easily done by opening the start menu and typing
-
Copy & paste the following entries at the bottom of the
hosts
file and replace each<XXXXXXX MACHINE IP>
with the appropriate machine IPs. Save thehosts
file as typeAll files (*.*)
(it should have NO file extension).- NOTE: The IP address required here cannot be 127.0.0.1. It is the IPv4 address for the machine’s current network connection. The IPv4 address can be observed by running
ipconfig
in Powershell or cmd.exe and looking under the correct network adapter’s (often d3net) value for IPv4.
- NOTE: The IP address required here cannot be 127.0.0.1. It is the IPv4 address for the machine’s current network connection. The IPv4 address can be observed by running
-
Add inbound rules to open mysql ports on EACH machine:
- In Windows Security —> Firewall & network protection —> Advanced Settings —> Inbound Rules —> Add Rule
- Choose “Ports” then hit Next
- Choose TCP and add or paste these as specific local ports:
3306,3307,3308,33061,33062,33063
- Allow the connection
- Apply the rule in all scenarios
- Name the rule “Porta MySQL Ports”
Porta On Prem Installation
Now the machine is set up to run Porta On Prem. Follow the Porta On Prem Installation Guide to complete the installation.
Troubleshooting
Installation
For Porta installation troubleshooting, see Installation Troubleshooting
Database Replication
For database troubleshooting, see Group Replication Troubleshooting
wsl --install -d Ubuntu-22.04
gives Error Code 0x80072ee7
WSL/Ubuntu set up will need to be done using the offline steps in the WSL Setup & Ubuntu Installation section above.
WslRegisterDistribution failed with error: 0x80370102
This error may occur when rebooting after wsl --install
.
Follow the WSL instructions to enable virtualization in the BIOS, then continue with the installation steps from earlier.
ERROR: CreateProcessParseCommon:711: Failed to translate
when running wsl
commands
Make sure that Ubuntu was set as a default distro, this error often indicates that Docker’s distro is being used instead of Ubuntu. Though soem commands like wsl -l -v --all
still worked.
This error displayed as:
Docker Desktop - Unexpected WSL error
An unexpected error was encountered while executing a WSL command…
In Powershell (not cmd or WSL), check wsl --status
, if you receive “WSL2 is not supported with your current machine configuration” then you need to enable virtualization in the BIOS. This process will vary depending on your machine.
Docker Installation Errors - “wsl update failed” or similar
If you encounter an error regarding WSL updates when installing Docker Desktop, make sure WSL is up to date by following the instructions in the troubleshooting section “Error: 0x8024500c after wsl —update”, then uninstall Docker Desktop and re-install it.
If you continue to encounter errors regarding WSL updates, uninstall Docker Desktop and re-install it, but this time under Configuration, DON’T check Use WSL2 instead of Hyper-V.
Once install has completed, Docker will prompt you to reboot. After reboot, start Docker Desktop again.
Navigate to Settings
Check “Use the WSL2 based engine”, then select “Apply & restart”.
Error: 0x8024500c after wsl --update
Some installs with Windows 10, or without using the Microsoft store, will display this error. Check the current WSL Kernel version by running wsl --version
(or wsl --status
) in Powershell and checking the entry for Kernel version
, which should begin with 5` (we do NOT want
WSL Version“, that is different).
If the Kernel version is not greater than or equal to 5.10.102.2
, then we will need to manually update the kernel:
- Visit Microsoft’s update catalog and sort by last updated. As of writing, the latest version is
5.10.102.2
. - Download the
.cab
file for the latest version - Double-click the
.cab
file to extract the.msi
file within in - Run
wsl_update_x64.msi
to install the WSL2 kernel update - Open powershell as administrator
- In powershell, run
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
to enable the new version - Run
wsl --set-default-version 2
- Check your WSL version with
wsl --version
(orwsl --status
)- the WSL version should be 2.X.X (start with 2)
- the Kernel version should be 5.10.102.2
Check the WSL version by running wsl --version
(or wsl --status
) in Powershell. If the wsl --version
and wsl --status
commands do not work, try running:
If the version listed is not greater than or equal to 2.0.14
, then you will need to manually update WSL by taking the following steps (as listed in Updating WSL 2 without Microsoft Store) :
Download the 2.0.14
WSL app package and msi release from the WSL Releases page in the Github repo. This will be the assets with file extension .msixbundle
and .msi
.
Run wsl --shutdown
and reboot to make sure that WSL is not in use at all.
Start an Administrator PowerShell and run the following (adjust the package name for the latest version you downloaded):
If you run into problems regarding windows store, try installing using the .msi
file instead.
After installing, check the new WSL version with wsl --version
or (Get-AppxPackage | ? Name -eq "MicrosoftCorporationII.WindowsSubsystemforLinux").Version
Reboot the machine