vagrant
vagrant copied to clipboard
Fix WSL 2 Docker Volume Sync Issue
By adjusting the conditional check for the file system, we can also check for 9P systems, which is what WSLs server is classed as. After changing this, we no longer get the error regarding the project being stored on the incorrect filesystem, however there still is an issue with pathing, as it formats the source location according to Windows pathing standards, although we're using WSL. If WSL is enabled, we want to use standard unix pathing as Docker recognizes that when mapping it's volumes. These changes allow for dockers folder sync to work.
Please note as this is WSL specific, it requires the Environment Variable VAGRANT_WSL_ENABLE_WINDOWS_ACCESS to be set.
Adjusted to use masters Ruby version. This should solve issue #11705 and #10576!
Thanks for this pr. I was struggling with getting vagrant to work in wsl2 as well. I've went a step further and added "ext4" to the filesystem list in lib/vagrant/util/platform.rb. This allows us to use docker and a wsl2 ubuntu-vm according to the docker "best practices" https://docs.docker.com/docker-for-windows/wsl/. this provides a nice performance boost.
As I'm not sure about the implications this might have to others I'm not going to add to this pr.
@vafschoen I'm glad this PR was able to help. I might attempt to test adding that file system myself as that definitely does sound like a nice change!
Has this functionality or similar changes been incorporated into master yet? @chrisroberts
Bump. Can someone please merge and release this ?
I'am using this pr as custom based on 2.2.10 version on my windows, no issues so far.
Thanks 😊
This change is going to be reviewed as part of a batch of proposed WSL changes in an upcoming release. It's good to hear it has worked for at least one user, but we want to make sure it doesn't break anything else. Labeling this so it gets picked up when we make our WSL sweep.
This change is going to be reviewed as part of a batch of proposed WSL changes in an upcoming release. It's good to hear it has worked for at least one user, but we want to make sure it doesn't break anything else. Labeling this so it gets picked up when we make our WSL sweep.
Any progress on this? :)