Simulating with Vortex on Windows Subsystem for Linux - WSL2
This document details how to use the same machine when running a Vortex simulation on Linux through WSL2 while creating content and debugging simulation from Windows as the host system.
Installing WSL2
See https://docs.microsoft.com/en-us/windows/wsl/
Windows Subsystem for Linux (WSL) lets developers run a GNU/Linux environment -- including most command-line tools, utilities, and applications -- directly on Windows, unmodified, without the overhead of a traditional virtual machine or dual-boot setup.
Follow the installation guidelines provided by Microsoft.
In this document, the distribution used is Ubuntu 22.04 LTS.
Installing Vortex
From Windows, the Ubuntu distribution is accessible under \\wsl$\Ubuntu-22.04\.
In Windows explorer, accessÂ
\\wsl$\Ubuntu-22.04\usr
and create a directoryvortex
.In Windows, copy in this directory the Vortex package for Linux, e.g.Â
Vortex_Studio_*_x64_gcc11.tar.gz
.In Ubuntu, call the unpacking instructionsÂ
tar xf Vortex_Studio_*_x64_gcc11.tar.gz
, Download and Installation#LinuxInstallationIn Ubuntu, follow the licensing instructions, see Generating Node-Locked License Files#GeneratingNode-LockedLicenseFilesonLinux
Running a Simulation with Vortex
Running a Vortex simulation on WSL is not different than running it on a host Linux system. Please refer to the appropriate section of Vortex Studio on Linux for more information about using the SimApp application to load your simulation content.
Debugging the Simulation
The Remote Debugger is the preferred way to debug simulations on Linux, see Vortex Studio Debugger.
Configuring and using Ubuntu IPv4 with Remote Debugger
The current Vortex version of the Remote Debugger supports only IPv4. By default, your Ubuntu distribution might favor IPv6 which won't work with the remote debugger application.
The following instructions will enable IPv4 for an Ubuntu distribution.
In WSL, localhost forwarding must be enabled ,see https://docs.microsoft.com/en-us/windows/wsl/wsl-config
.wslconfig
[wsl2] localhostForwarding=true
Â
In Ubuntu, IPv4 must be favored, edit
/etc/gai.conf
and uncomment IPv4 commented linesIn case, this would not be sufficient, it is possible to disable IPv6, for example with the following command
# sysctl -w net.ipv6.conf.all.disable_ipv6=1 # sysctl -w net.ipv6.conf.default.disable_ipv6=1
Â
Finally, the IP address to use in the remote debugger interface can be determined with the following command
The console output foreth0 inet
value will describe an IPv4 address, e.g.Â172.31.78.54
# ip addr