microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.43k stars 823 forks source link

Automount vhdx disk images via [automount] settings .wslconfig , wsl.conf #11187

Open nkrepo opened 8 months ago

nkrepo commented 8 months ago

There is a need to easily automount vhdx virtual disk images in WSL2 every time WSL2 is booted. Now vhdx can be easily mounted in a WSL2 distro, but only after WSL2 has started and it required to be re-mounted every time WSL2 is rebooted. Various automation scripts and hacks exist to achieve that, but they are not 100% reliable and not elegant.

The proposed solution is to add the ability to mount a vhdx by specifying the image alongside with the mount options in the [automount] section of .wslconfig, wsl.conf every time the WSL2 is booted.

github-actions[bot] commented 8 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.