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\.

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.

  1. In WSL, localhost forwarding must be enabled ,see https://docs.microsoft.com/en-us/windows/wsl/wsl-config

    .wslconfig

    [wsl2] localhostForwarding=true

     

  2. In Ubuntu, IPv4 must be favored, edit /etc/gai.conf and uncomment IPv4 commented lines

  3. In 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

     

  4. Finally, the IP address to use in the remote debugger interface can be determined with the following command
    The console output for eth0 inet value will describe an IPv4 address, e.g. 172.31.78.54

    # ip addr