Roots Discourse

Trellis not compatible with WSL 2

Hello,

I’ve switched from WSL 1 to WSL 2 and now vagrant up not working.

Here is the error:

xxx@xxx:/mnt/c/.../trellis$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:

vm:
* The host path of the shared folder is not supported from WSL. Host
path of the shared folder must be located on a file system with
DrvFs type. Host path: /mnt/c/.../site
* The host path of the shared folder is not supported from WSL. Host
path of the shared folder must be located on a file system with
DrvFs type. Host path: /mnt/c/.../trellis
DrvFs type. Host path: /mnt/c/.../trellis/bin
* The host path of the shared folder is not supported from WSL. Host
path of the shared folder must be located on a file system with
DrvFs type. Host path: .

Revert to WSL 1 and it works again.

What can you do to allow trellis to work with WSL 2?

Thanks.

Config:

  • Windows 10 2004
  • WSL 2
  • WSL distro: Debian 10
  • Vagrant 2.2.9

Were you starting with a fresh VM or was this for an existing one? I’d be curious if vagrant reload would help here. It might be an issue with previously mounted shared folders.

Found these issues which confirm what you experienced: https://github.com/hashicorp/vagrant/issues/11623 + https://github.com/hashicorp/vagrant/issues/11604

This implies it’s a Vagrant bug since they’re preventing it from running.

1 Like