-
Notifications
You must be signed in to change notification settings - Fork 255
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
feat(xo-server/createVm): create VTPM if template requests it #7436
Conversation
if (vm.platform.vtpm === 'true') { | ||
await this.VTPM_create({ VM: vm.$ref }) | ||
} | ||
|
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.
What about the existing widget in the VM creation page's advanced settings? It looks like this bypasses it. So users creating a new Windows 11 VM and opening the advanced settings before hitting "Create" would see the widget is off, like no vTPM would be created, when in fact a vTPM will still be created.
I also found out something else about how XAPI behaves regarding vTPMs. On XOA latest (so without this commit), I created a VM from the Windows 11 templates, but without enabling vTPM. This created no vTPM, as expected. But as soon as I started the VM, a vTPM was created by XAPI. I believe they did this based on vm.platform.vtpm
.
Consequently, I believe the best behaviour would be, at VM creation, to make the widget status automatically match the template's platform.vtpm
field, and change what this widget does: if set to true
, by users, define platform.vtpm
as true and create the vTPM (or let XAPI create it at first boot, as you prefer. Creating it avoids the situation where users set it to true but don't start the VM immediately and might notice there's no vTPM yet), and if set to false
by user, make sure vm.platform.vtpm
is set to false
too so that XAPI doesn't create one at first boot.
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.
This should have been the case but it was broken.
This should now be fixed: 009c0ea
Introduced by 8834af6 Introduced by 2e002de Fixes #7436 (comment)
Description
See https://team.vates.fr/vates/pl/d3mb7wb5fiy57pmp44wnusatce (private page)
Should fix https://www.youtube.com/watch?v=MqHuNu4hjJo
Checklist
Fixes #007
,See xoa-support#42
,See https://...
)Introduced by
CHANGELOG.unreleased.md