devopsgroup-io / vagrant-hostmanager

:pencil: A Vagrant plugin that manages hosts files within a multi-machine environment.
Mozilla Public License 2.0
1.46k stars 148 forks source link

Hostmanager should update both WSL2 host and guest #284

Open hemangajmera opened 2 years ago

hemangajmera commented 2 years ago

Hi Not sure if this is possible automatically. I have installed https://www.vagrantup.com/docs/other/wsl and installed hostmanager plugin in WSL2 ubuntu. The plugin updates the file /etc/hosts in ubuntu, but does not update the windows host file, so the hosts entries are not available on windows and I cannot use windows web browser until I manually update C:\Windows\System32\drivers\etc\hosts

Can this plugin take care of it. We can provide some additional parameters to also update windows hosts file along with WSL2 hosts file, so that this is not default behavior.