Creating a workspace on Windows fails with "Subsystem for Linux has no installed distributions" by default

I’m trying to create a Workspace on a Windows job with this config, but it fails:

    - env: BUILD=windows
      os: windows
      workspaces:
        create:
          name: ws-windows
          paths: deploy

Here’s the error log:

    travis_fold:start:workspaces_create
    e[0Ke[32;1mCreating workspacese[0m
    e[32;1mWorkspace: ws-windowse[0m
    $ export CASHER_DIR=${TRAVIS_HOME}/.casher
    travis_time:start:2ffe953c
    e[0K$ Installing caching utilities
    travis_time:end:2ffe953c:start=1594000248383223600,finish=1594000248717589300,duration=334365700,event=create_workspaces
    e[0Ktravis_time:start:190ee830
    e[0KWindows Subsystem for Linux has no installed distributions.

    Distributions can be installed by visiting the Microsoft Store:

    https://aka.ms/wslstore

travis_time:end:190ee830:start=1594000248798661400,finish=1594000248989509800,duration=190848400,event=create_workspaces
    e[0Ktravis_time:start:0e0ac21e
    e[0KWindows Subsystem for Linux has no installed distributions.

    Distributions can be installed by visiting the Microsoft Store:

    https://aka.ms/wslstore

    travis_time:end:0e0ac21e:start=1594000249049910000,finish=1594000249149930300,duration=100020300,event=create_workspaces
    e[0K
    travis_fold:end:workspaces_create
    e[0K

I’ve tried lxrun /install but lxrun: command not found, and powershell -Command 'Add-AppxPackage .\Ubuntu.appx' but it says Deployment failed with HRESULT: 0x80073D19, An error occurred because a user was logged off.

It would be really useful if workspaces could be created without any special setup in the job itself.

Imprint