Vscode-remote-release: Support VSCode Remote for WSL on ARM64

Created on 30 Oct 2019  ·  13Comments  ·  Source: microsoft/vscode-remote-release

  • VSCode Version: 1.39.2
  • Local OS Version: 19013
  • Remote Extension/Connection Type: WSL

Steps to Reproduce:

I’m installing the x86 version of VS Code on my ARM64 device using Cobalt. However when I enable the new VS Code Remote extension for WSL, things fall over because the part that runs in WSL seems to only be built for x64. The same issue exists for WSL1 and WSL2.

  1. Enable Windows Subsystem for Linux (reboot if needed)
  2. Install a distribution (I used Debian)
  3. Install x86 version of VS Code
  4. Launch VS Code
  5. See popup about installing suggested VS Code Remote extension since I have WSL installed.
  6. Run “Remote-WSL: New Window” in VS Code
  7. Observe error in terminal view about exec format error. I inspected the node binary that VS Code is attempting to run in WSL, and it is an x64 binary. I suspect if this package was built for aarch64 this would just work.
feature-request verified wsl

All 13 comments

We have ARM builds of the server bits (ARM7 and ARM8).
I wasn't aware that WSL can run on it too.
I don't have such a device, but if you like I can try to fix it blindly.

what does uname -m return?

aarch64

I have a few ARM64 devices, I'd be happy to help you test a fix.

The new Surface ProX is an ARM64 device. I'm running Win10 Insiders Fast, it supports WSL2 on ARM, and I have this same issue. Running 'code .' in Ubuntu 18.04 installs the x64 linux binary. uname -m returns aarch64.

Is there a way to force manual install of an aarch64 compile of the WSL version of vscode-server as a workaround? Happy to test and provide feedback.

pubished 0.40.2 that downloads the arm64 build if we see aarch64. Not tested except for that the install works.

Alpine on ARM won't work, we don't have such a build.

I'm still getting the issue on my Surface Pro X with 0.40.2 in Ubuntu WSL2

[2019-11-07 12:30:30.955] Starting VS Code Server inside WSL (Ubuntu)
[2019-11-07 12:30:30.956] Extension version: 0.40.2, Windows build: 19018. Multi distro support: enabled. WSL path support: enabled
[2019-11-07 12:30:31.401] Probing if server is already installed: C:\WINDOWS\Sysnative\wsl.exe -d Ubuntu -e sh -c "[ -d ~/.vscode-server-insiders/bin/86405ea23e3937316009fc27c9361deee66ffbf5 ] && printf found || ([ -f /etc/alpine-release ] && printf alpine-; uname -m)"
[2019-11-07 12:30:32.945] Probing result: found
[2019-11-07 12:30:32.945] Server install found in WSL
[2019-11-07 12:30:32.945] Launching C:\WINDOWS\Sysnative\wsl.exe -d Ubuntu sh -c '"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" 86405ea23e3937316009fc27c9361deee66ffbf5 insider .vscode-server-insiders 0  ' in c:\Users\Roger\.vscode-insiders\extensions\ms-vscode-remote.remote-wsl-0.40.2
[2019-11-07 12:30:33.240] Setting up server environment: Looking for /home/roger/.vscode-server-insiders/server-env-setup. Not found.
[2019-11-07 12:30:33.240] WSL version: 4.19.79-microsoft-standard Ubuntu
[2019-11-07 12:30:33.241] Updating server...
[2019-11-07 12:30:33.241] Starting server: /home/roger/.vscode-server-insiders/bin/86405ea23e3937316009fc27c9361deee66ffbf5/server.sh  --port=0 --enable-remote-auto-shutdown 
[2019-11-07 12:30:33.243] /home/roger/.vscode-server-insiders/bin/86405ea23e3937316009fc27c9361deee66ffbf5/server.sh: 12: /home/roger/.vscode-server-insiders/bin/86405ea23e3937316009fc27c9361deee66ffbf5/server.sh: /home/roger/.vscode-server-insiders/bin/86405ea23e3937316009fc27c9361deee66ffbf5/node: Exec format error
[2019-11-07 12:30:33.244] VS Code Server for WSL closed unexpectedly.
[2019-11-07 12:30:33.245] For help with startup problems, go to
[2019-11-07 12:30:33.245] https://code.visualstudio.com/docs/remote/troubleshooting#_wsl-tips

@rogerchi you have to delete the already installed (x64) build:
rm -r ~/.vscode-server-insiders/bin

Thank you, that did it!

I'm not familiar with how to download a new version of the extension, are there instructions?

Ah, I need code-insiders it seems.

Yep, working like a charm. Thanks @aeschli.

Yes, requires >= VSCode 1.40. Stable 1.40 got released yesterday.

Was this page helpful?
0 / 5 - 0 ratings