libvirt/qemu provide support for virtual Trusted Platform Module (TPM) via the swtpm package(*). Are there plans to extend this support to OpenNebula as well? I guess the bare minimum would be to be able to move the swtpm data with the VM on reschedule/migrate.
Is the vTPM available in the paid version of OpenNebula?
How can you put in the official doc something like * Disable TPM for Windows 11 using the registry? Is this professional? It’s not even your material.
There’s no problem on referencing other articles that includes a solution to a problem, and avoid duplicating content. We are aware this is a temporary workaround until the TPM feature is finally implemented (on both versions).
Please understand, this is a work in progress, and we are working on the implementation, so please be patient.
I am running KVM at the host and Opennebula 6.8.0. I tried to add a RAW TPM section at the VM config. Since for some reason it does not pass the validation I disabled validation as below:
RAW = [
TYPE = "KVM",
VALIDATE = "no",
DATA = "<tpm><backend type='emulator' version='2.0'/></tpm>"
]
But still this is not seen at the XML of the VM. I am trying this as it will be a good work-around to be able to add vTPM support at the VM in this way until it is fully supported from the UI. This is needed for Windows 11 VMs. How could I pass such RAW XML data to a deployment?
Unfortunately, it does not work by default on ONE 6.10 since swtpm is run as root:
Starting vTPM manufacturing as root:root @ Tue 19 Nov 2024 10:56:27 AM CET
The qemu process can’t access that socket by default
Tue Nov 19 10:56:31 2024 [Z0][VMM][E]: DEPLOY: error: Failed to create domain from /var/lib/one//datastores/0/34/deployment.0 error: internal error: process exited while connecting to monitor: 2024-11-19T09:56:27.597981Z qemu-kvm-one: -chardev socket,id=chrtpm,path=/run/libvirt/qemu/swtpm/12-one-34-swtpm.sock: Failed to connect to '/run/libvirt/qemu/swtpm/12-one-34-swtpm.sock': Permission denied Could not create domain from /var/lib/one//datastores/0/34/deployment.0 ExitCode: 255
To fix that, I needed:
to edit /etc/libvirt/qemu.conf
sed -i -E 's,^#?(swtpm_[^ ]+).*,\1 = "oneadmin",' /etc/libvirt/qemu.conf