Persistent vTPM does not work when VM names have dots in them
Issue
When setting up persistent vTPM for Openshift-Virt, the configuration succeeds but the setup will fail if the VM guest hostname has dots in it. The TPM persistent volume creation fails with the following type of error:
message: 'failed to create virtual machine pod: Pod "virt-launcher-fedora.test.vm-n6l5j"
is invalid: [spec.volumes[8].name: Invalid value: "fedora.test.vm-tpm": must
not contain dots, spec.containers[0].volumeMounts[9].name: Not found: "fedora.test.vm-tpm",
Environment
Openshift Virtualization 4.14
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.