Skip to content

Commit a6d449b

Browse files
deepak1556ntrogh
andauthored
docs: update remote faq for unsupported server mode (#7953)
* docs: update remote faq for unsupported server mode * Review updates * Update note * doc: add sample container to prepare crosstool-ng * Update docs/remote/faq.md * Update docs/remote/faq.md * doc: add clause about recommended patchelf version --------- Co-authored-by: Nick Trogh <[email protected]>
1 parent c6768e9 commit a6d449b

File tree

1 file changed

+61
-1
lines changed

1 file changed

+61
-1
lines changed

docs/remote/faq.md

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,67 @@ See [Remote Development with Linux](/docs/remote/linux.md) for additional detail
109109

110110
### Can I run VS Code Server on older Linux distributions?
111111

112-
Starting with VS Code release 1.86.1 (January 2024), the minimum requirements for the build toolchain of the remote server were raised. The prebuilt servers distributed by VS Code are compatible with Linux distributions based on glibc 2.28 or later, for example, Debian 10, RHEL 8, or Ubuntu 20.04. VS Code will still allow users to connect to an OS that is not supported by VS Code (OS that does not provide glibc >= 2.28 and libstdc++ >= 3.4.25) until February 2025. This allows time for you and your companies to migrate to newer Linux distributions. VS Code will show a dialog and banner message when you connect to an OS version that is not supported by VS Code.
112+
Starting with VS Code release 1.99 (March 2025), the prebuilt servers distributed by VS Code are only compatible with Linux distributions that are based on glibc 2.28 or later. These include for example, Debian 10, RHEL 8, or Ubuntu 20.04.
113+
114+
VS Code will still allow users to connect to an OS that is not supported by VS Code (OSes that don't have glibc >= 2.28 and libstdc++ >= 3.4.25) via the [Remote - SSH](https://aka.ms/vscode-remote/download/ssh) extension, if a sysroot with these required library versions is provided. This approach gives you and your organization more time to migrate to newer Linux distributions.
115+
116+
| VS Code version | Base Requirements | Notes |
117+
|--------------|-------------------|-------|
118+
| 1.99.x | kernel >= 4.18, glibc >=2.28, libstdc++ >= 3.4.25, binutils >= 2.29 | &lt;none&gt; |
119+
120+
> [!IMPORTANT]
121+
> This approach is a technical workaround and is not an officially supported usage scenario.
122+
123+
Follow these steps to configure your environment for this workaround:
124+
125+
1. Build the sysroot
126+
127+
We recommend using [Crosstool-ng](https://crosstool-ng.github.io/docs/) to build the sysroot. Here are some example configs that you can start with:
128+
129+
* [x86_64-gcc-8.5.0-glibc-2.28](https://github.com/microsoft/vscode-linux-build-agent/blob/main/x86_64-gcc-8.5.0-glibc-2.28.config)
130+
* [aarch64-gcc-8.5.0-glibc-2.28](https://github.com/microsoft/vscode-linux-build-agent/blob/main/aarch64-gcc-8.5.0-glibc-2.28.config)
131+
* [armhf-gcc-8.5.0-glibc-2.28](https://github.com/microsoft/vscode-linux-build-agent/blob/main/armhf-gcc-8.5.0-glibc-2.28.config)
132+
133+
The following example container can also be used to have an environment with [Crosstool-ng](https://crosstool-ng.github.io/docs/) installed:
134+
135+
```docker
136+
FROM ubuntu:latest
137+
138+
RUN apt-get update
139+
RUN apt-get install -y gcc g++ gperf bison flex texinfo help2man make libncurses5-dev \
140+
python3-dev autoconf automake libtool libtool-bin gawk wget bzip2 xz-utils unzip \
141+
patch rsync meson ninja-build
142+
143+
# Install crosstool-ng
144+
RUN wget http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.26.0.tar.bz2
145+
RUN tar -xjf crosstool-ng-1.26.0.tar.bz2
146+
RUN cd crosstool-ng-1.26.0 && ./configure --prefix=/crosstool-ng-1.26.0/out && make && make install
147+
ENV PATH=$PATH:/crosstool-ng-1.26.0/out/bin
148+
```
149+
150+
Once you have an environment with [Crosstool-ng](https://crosstool-ng.github.io/docs/) and the relevant configs prepared, run the following commands to generate the sysroot
151+
152+
```sh
153+
mkdir toolchain-dir
154+
cd toolchain-dir
155+
cp <path-to-config-file> > .config
156+
ct-ng build
157+
```
158+
159+
2. VS Code server uses [patchelf](https://github.com/NixOS/patchelf) during the installation process to consume the required libraries from the sysroot.
160+
161+
> [!IMPORTANT]
162+
> patchelf `v0.17.x` is known to cause segfaults with the remote server, we recommend using patchelf `>=v0.18.x`
163+
164+
3. Install the patchelf binary and the sysroot on the remote host
165+
166+
4. Create the following 3 environment variables:
167+
168+
* **VSCODE_SERVER_CUSTOM_GLIBC_LINKER** path to the dynamic linker in the sysroot (used for `--set-interpreter` option with [patchelf](https://github.com/NixOS/patchelf))
169+
* **VSCODE_SERVER_CUSTOM_GLIBC_PATH** path to the library locations in the sysroot (used as `--set-rpath` option with [patchelf](https://github.com/NixOS/patchelf))
170+
* **VSCODE_SERVER_PATCHELF_PATH** path to the [patchelf](https://github.com/NixOS/patchelf) binary on the remote host
171+
172+
You can now connect to the remote by using the [Remote - SSH](https://aka.ms/vscode-remote/download/ssh) extension. On successful connection, VS Code will show a dialog and banner message about the connection not being supported.
113173
114174
### Can I install individual extensions instead of the extension pack?
115175

0 commit comments

Comments
 (0)