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

[FEATURE] TPM support #2910

Closed
abonillabeeche opened this issue Oct 11, 2022 · 17 comments
Closed

[FEATURE] TPM support #2910

abonillabeeche opened this issue Oct 11, 2022 · 17 comments
Assignees
Labels
area/terraform area/ui blocker blocker of major functionality highlight Highlight issues/features kind/enhancement Issues that improve or augment existing functionality not-require/test-plan Skip to create a e2e automation test issue priority/0 Must be fixed in this release require/doc Improvements or additions to documentation require-ui/small estimate 1-2 working days
Milestone

Comments

@abonillabeeche
Copy link

TPM Support is expected for certain Edge/secure deployments (FIDO Secure Onboarding).
Windows 11 requires TPM
Elemental requires TPM

@abonillabeeche abonillabeeche added the kind/enhancement Issues that improve or augment existing functionality label Oct 11, 2022
@abonillabeeche
Copy link
Author

This is achievable via virt-manager and this is an example with screenshots
https://rancher.github.io/elemental/tpm/#add-tpm-emulation-to-bare-metal-machine

@rebeccazzzz rebeccazzzz added this to New in Feature Request Review via automation Oct 11, 2022
@futuretea
Copy link
Contributor

Refer to https://kubevirt.io/2022/KubeVirt-installing_Microsoft_Windows_11_from_an_iso.html
We need an option to add emulated TPM to VM in both UI and terraform-provider-harvester

@futuretea futuretea added area/ui area/terraform require-ui/small estimate 1-2 working days and removed area/ui labels Nov 15, 2022
@yasker yasker moved this from New to Long-term in Feature Request Review Nov 17, 2022
@Martin-Weiss
Copy link

How can we add tpm: {} in the device section of a VM using the terraform provider harvester_virtualmachine (Resource) for harvester?

@futuretea
Copy link
Contributor

How can we add tpm: {} in the device section of a VM using the terraform provider harvester_virtualmachine (Resource) for harvester?

I will submmit a PR to support it.

@futuretea futuretea self-assigned this Dec 8, 2022
@rebeccazzzz rebeccazzzz added this to the v1.2.0 milestone Dec 8, 2022
@guangbochen guangbochen added highlight Highlight issues/features priority/1 Highly recommended to fix in this release labels Dec 9, 2022
@guangbochen guangbochen added priority/0 Must be fixed in this release and removed priority/1 Highly recommended to fix in this release labels Dec 28, 2022
@abonillabeeche
Copy link
Author

@futuretea did you manage to get this PR submitted? Wondering if will add tpm: {} to both a single instance and multiple instances when creating VMs.

@abonillabeeche
Copy link
Author

@rebeccazzzz can we move this to 1.1.2 considering the low effort?

@guangbochen guangbochen added the blocker blocker of major functionality label Feb 22, 2023
@futuretea futuretea changed the title [FEATURE] tpm 2 support [FEATURE] TPM support Mar 1, 2023
@WuJun2016 WuJun2016 self-assigned this Mar 1, 2023
@harvesterhci-io-github-bot
Copy link

harvesterhci-io-github-bot commented Mar 1, 2023

Pre Ready-For-Testing Checklist

* [ ] If labeled: require/HEP Has the Harvester Enhancement Proposal PR submitted?
The HEP PR is at:

* [ ] Is there a workaround for the issue? If so, where is it documented?
The workaround is at:

* [ ] Does the PR include the explanation for the fix or the feature?

* [ ] Does the PR include deployment change (YAML/Chart)? If so, where are the PRs for both YAML file and Chart?
The PR for the YAML change is at:
The PR for the chart change is at:

* [ ] If NOT labeled: not-require/test-plan Has the e2e test plan been merged? Have QAs agreed on the automation test case? If only test case skeleton w/o implementation, have you created an implementation issue?
- The automation skeleton PR is at:
- The automation test case PR is at:

* [ ] If the fix introduces the code for backward compatibility Has a separate issue been filed with the label release/obsolete-compatibility?
The compatibility issue is filed at:

@harvesterhci-io-github-bot
Copy link

harvesterhci-io-github-bot commented Mar 1, 2023

Automation e2e test issue: harvester/tests#730

@futuretea futuretea added the require/doc Improvements or additions to documentation label May 9, 2023
@irishgordo irishgordo assigned irishgordo and unassigned irishgordo May 15, 2023
@irishgordo
Copy link

Validation Failed
@futuretea @WuJun2016

Currently, trying to validate this on Harvester Version: master-c9d8825c-head following Windows Install Instructions

And running into an issue where Windows 11 Enterprise Edition, based on Windows 11 Enterprise Evaluation, available from Microsoft and I'm not able to complete the install with TPM enabled.
Also seeing issues enabling EFI & Secure Boot, w/ TPM Enabled.

Screenshot from 2023-05-15 15-13-14

@irishgordo irishgordo removed their assignment May 15, 2023
@futuretea
Copy link
Contributor

@irishgordo Can you help to confirm whether the VM specifications used meet windows-11-requirements ?

@futuretea
Copy link
Contributor

@irishgordo
Refer to harvester/docs#310
Both the TPM device and UEFI firmware with SecureBoot are hard requirements for Windows 11.
2953e1f05f55d4ada6f5481eef90722
92223a1dcc37ce124625182e7944849

@irishgordo
Copy link

validation in progress, slight issues, will check with latest master-head

I'm noticing issues migrating but will be retrying the migration with the latest master-head release as:
#3399

Just got merged in earlier 😄

Also noticing that a WindowVM created -> create a snapshot -> restore to a new vm from snapshot
The vm will never spin up.
And will hang.
I will check if I can reproduce on the latest master-head prior to opening an issue 😄

Screenshot from 2023-05-16 12-30-09
Screenshot from 2023-05-16 12-29-08
Screenshot from 2023-05-16 12-28-04
Screenshot from 2023-05-16 12-17-16
Screenshot from 2023-05-16 12-16-31
Screenshot from 2023-05-16 12-14-06
Screenshot from 2023-05-16 12-07-37
Screenshot from 2023-05-16 11-54-14
supportbundle_d0a70753-473a-4de6-8b8c-24649bded98d_2023-05-16T19-42-24Z.zip

@irishgordo
Copy link

Validation Failed

@futuretea it seems that migration between nodes does not happen from the following scenario:

  • create windows vm
  • install drivers for virtio
  • install windows
  • allow to boot
  • eject both CD-ROM containing Windows 11 ISO & Container Disk registry.suse.com/suse/vmdp/vmdp:2.5.3
  • attempt to migrate VM

Screenshot from 2023-05-16 16-10-31
Screenshot from 2023-05-16 16-09-56

curl 'https://HARVESTERVIPIP/v1/harvester/kubevirt.io.virtualmachines/default/win-11-ent-eval-test?action=migrate' -X POST -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/112.0' -H 'Accept: application/json' -H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate, br' -H 'Content-Type: application/json;charset=utf-8' -H 'x-api-csrf: d3511a4b1642481199ce7161e5fded4c' -H 'Origin: https://HARVESTERVIPIP' -H 'Connection: keep-alive' -H 'Referer: https://HARVESTERVIPIP/dashboard/harvester/c/local/kubevirt.io.virtualmachine' -H 'Cookie: R_PCS=light; R_LOCALE=en-us; R_REDIRECTED=true; CSRF=d3511a4b1642481199ce7161e5fded4c; R_SESS=token-44zqf:cdrgftlk92sn7nzvf859s5gfthtvph6645x5scrqjn4w56thfwfvss' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: same-origin' -H 'TE: trailers' --data-raw '{"nodeName":"harvester-hzb6c"}'

Yields 500:

Volume disk-2 is container disk, needs to be removed before migration

There seems to be no, disk-2 attached to the VM currently however.

Tested with Harvester Version: master-0b495171-head.
That should have:
#3399
Within the source I believe 🤔

@futuretea
Copy link
Contributor

futuretea commented May 17, 2023

@irishgordo View yaml by editing yaml, found container disk, It's a bug about enjectCDROM, not introduced by #3399, It has been around for a long time, but no one ever found it. Good job!
image

@futuretea
Copy link
Contributor

futuretea commented May 17, 2023

@irishgordo issue #3914 created, I will fix it, fixed

@irishgordo
Copy link

irishgordo commented May 17, 2023

Screenshot from 2023-05-17 12-24-01
Screenshot from 2023-05-17 12-23-24
Screenshot from 2023-05-17 12-22-26
Screenshot from 2023-05-17 12-20-42
Screenshot from 2023-05-17 12-20-25
Screenshot from 2023-05-17 12-20-09

@futuretea thanks for the fix 👍 😄 in #3914

Tested that migration now works off of: Harvester Version: master-25d478c0-head

Validation Failed

But I just opened:
#3929

As noticing (Win11 TPM VM) VM A -> Snapshot of A -> Restore to New VM (B) -> Take Snapshot of New VM (B) -> Stop New VM (B) -> Replace Existing (B)
Is hanging/failing

@irishgordo irishgordo self-assigned this May 17, 2023
@irishgordo
Copy link

@futuretea thanks for the fix surrounding #3929 - I was able to validate on master-head: master-d739c2a4-head that the problem no longer exists and everything else surrounding this looks good 👍 😄

Screenshot from 2023-05-18 16-50-57
Screenshot from 2023-05-18 15-50-46

This looks good from my end 😄 - I'll go ahead and close this out

Feature Request Review automation moved this from Long-term to Scheduled/Closed May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/terraform area/ui blocker blocker of major functionality highlight Highlight issues/features kind/enhancement Issues that improve or augment existing functionality not-require/test-plan Skip to create a e2e automation test issue priority/0 Must be fixed in this release require/doc Improvements or additions to documentation require-ui/small estimate 1-2 working days
Projects
Feature Request Review
Scheduled/Closed
Development

No branches or pull requests

9 participants