Skip to content
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

TPM support in WSL distros #5178

Open
Firehawke opened this issue May 7, 2020 · 8 comments
Open

TPM support in WSL distros #5178

Firehawke opened this issue May 7, 2020 · 8 comments
Labels
feature kconfig linux kernel configuration

Comments

@Firehawke
Copy link

Is your feature request related to a problem? Please describe.
I'd like to be able to allow Linux to use the TPM module so that I can use it for SSH, GPG, etc from the Linux side of things.

Describe the solution you'd like
I'd like for either Linux to be able to directly talk to the TPM or for some intermediary method (similar to how you can already pass SSH key requests from Linux over to the Windows side using wsl-ssh-agent-gui)

How access is obtained doesn't particularly matter so long as it's possible to access and use from either side (Windows and Linux both)

@therealkenc
Copy link
Collaborator

image

@therealkenc therealkenc added feature kconfig linux kernel configuration labels Oct 2, 2020
@lazerl0rd
Copy link

lazerl0rd commented Sep 10, 2021

@therealkenc, to support the feature mentioned we'd need some form of a vTPM provided to the guest by the hypervisor (on top of the said config being enabled) but it seems Hyper-V already has such a feature according to https://docs.microsoft.com/en-us/powershell/module/hyper-v/enable-vmtpm.

@Jayonics
Copy link

Jayonics commented Dec 7, 2021

@therealkenc, to support the feature mentioned we'd need some form of a vTPM provided to the guest by the hypervisor (on top of the said config being enabled) but it seems Hyper-V already has such a feature according to https://docs.microsoft.com/en-us/powershell/module/hyper-v/enable-vmtpm.

I tried going along with this method. I'm not sure if this post refers to WSL2 or WSL v1 - but WSL2 distros do not appear as HyperV Virtual Machines so it's not possible to Enable-VMTPM on any of the running WSL2 distros as they don't appear in either Get-VM or in Hyper-V Manager.

@lazerl0rd
Copy link

lazerl0rd commented Dec 14, 2021

@therealkenc, to support the feature mentioned we'd need some form of a vTPM provided to the guest by the hypervisor (on top of the said config being enabled) but it seems Hyper-V already has such a feature according to https://docs.microsoft.com/en-us/powershell/module/hyper-v/enable-vmtpm.

I tried going along with this method. I'm not sure if this post refers to WSL2 or WSL v1 - but WSL2 distros do not appear as HyperV Virtual Machines so it's not possible to Enable-VMTPM on any of the running WSL2 distros as they don't appear in either Get-VM or in Hyper-V Manager.

WSL2 isn't run on Hyper-V (as in, the userland Hyper-V API), so cannot be "controlled" with the PowerShell features as such. I merely mentioned it in that it exists in one of the Hyper-V APIs so it shouldn't be impossible to add such a feature to another.

@Luk164
Copy link

Luk164 commented Oct 26, 2022

Has there been any progress on this issue?

@masalinas
Copy link

my WSL2 Ubuntu distrinution not detect my TPM module activated and not create any /dev/tpm0 device file to be used. How can I resolve that?

@purplelemons-dev
Copy link

I'd like to use this feature with WSL2 Debian--it's not necessary or anything, I'm just wondering if it's possible.

@Aetherinox
Copy link

Highly interested (and in need) of this. Some type of update / priority on this would be absolutely amazing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature kconfig linux kernel configuration
Projects
None yet
Development

No branches or pull requests

8 participants