weizhouapache commented on issue #11842:
URL: https://github.com/apache/cloudstack/issues/11842#issuecomment-3406398762

   if vm runs on local storage, this might work
   ```
   @@ -123,7 +123,7 @@
          <alias name='input2'/>
        </input>
        <tpm model='tpm-tis'>
   -      <backend type='emulator' version='2.0'/>
   +      <backend type='emulator' version='2.0' persistent_state='yes'/>
          <alias name='tpm0'/>
        </tpm>
   ```
   
   however, if vm runs on shared storage, when vm is migrated, or started on 
another host, it will not work, as the tpm file is saved on the original host, 
for example `/var/lib/libvirt/swtpm/<vm uuid>/tpm2/tpm2-00.permall`
   
   we could save the tpm file on the same primary pool as ROOT disk, for 
example `<path of ROOT disk>.tpm2`, add then create a vm with tpm device (it is 
supported since libivrt v10.10.0, so it does not work on RHEL 8/9 and ubuntu 
22/24, it only works with RHEL 10)
   ```
          <alias name='input2'/>
        </input>
        <tpm model='tpm-tis'>
   -      <backend type='emulator' version='2.0'/>
   +      <backend type='emulator' version='2.0' persistent_state='yes'>
   +          <source type='file' path='<path of ROOT disk>.tpm2'/>
   +      </backend>
          <alias name='tpm0'/>
        </tpm>
   ```
   then we need to handle the migration of the tpm2 file when migrate ROOT disk 
to another storage pool.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to