-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for running within WSL2 #57
Conversation
It would be great to include this feature in next release. I also ran into this limitation in Linux environment in WSL2 where I have all dev tools, forcing me to switch to Powershell in Windows. |
This sounds great, would definitely use it! |
Hi @camjjack thanks for opening up this change. Overall it looks good. I will pull it down and give it a round of testing, and a closer review. I'm releasing 1.1.1 today to get out the TPM change but will follow up with this change for the next release. |
In the meantime, can you please rebase onto main to pull in the latest changes to the plugin. |
Thanks @nywilken, I've rebased onto main and pushed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@camjjack apologies for the delayed response. I was unable to prioritize this review until now. I do apologize. I tested your changes and I am able to build in a WSL environment without issue (well I had to play with my default switch a little for hyperv) but that is outside of WSL. I'll rebase and merge in your changes.
Support for running from within WSL2.
Similar to vagrant it will work when run from a windows filesystem within wsl i.e.
/mnt/c/Users/user/...
Further,
PACKER_CACHE_DIR
needs to be set to a path on the windows filesystem.This is all I needed for my testing to work.
/mnt/c/Users/user/packer-plugin-hyperv$ PACKER_CACHE_DIR=/mnt/c/Users/user/.packer packer build ...
Closes #38