[PATCH v2 2/9] qemu: Introduced VIR_MIGRATE_TPM_SHARED_STORAGE for TPM migration

Daniel P. Berrangé berrange at redhat.com
Thu Oct 6 13:47:27 UTC 2022


On Wed, Oct 05, 2022 at 10:02:00AM -0400, Stefan Berger wrote:
> Introduced VIR_MIGRATE_TPM_SHARED_STORAGE for migrating a TPM across
> shared storage.
> 
> At this point do not support this flag in 'virsh', yet.
> 
> Signed-off-by: Stefan Berger <stefanb at linux.ibm.com>
> ---
>  include/libvirt/libvirt-domain.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
> index 8357aea797..110929039d 100644
> --- a/include/libvirt/libvirt-domain.h
> +++ b/include/libvirt/libvirt-domain.h
> @@ -1098,6 +1098,14 @@ typedef enum {
>       * Since: 8.5.0
>       */
>      VIR_MIGRATE_ZEROCOPY = (1 << 20),
> +
> +    /* Support TPM migration across hosts that have shared storage setup for
> +     * the directory structure holding the state of TPMs. Typically this would
> +     * mean that the directory /var/lib/libvirt/swtpm is shared.
> +     *
> +     * Since: 8.9.0
> +     */
> +    VIR_MIGRATE_TPM_SHARED_STORAGE = (1 << 21),

Why do we need this flag at all.  We don't require users to set any flag
when dealing with shared storage for disks, we just make sure we detect
shared storage and "do the right thing" with it.

Adding this flag introduces failure scenarios, such as mgmt app not
setting the flag, but still have the TPM on shared storage, in which
case we'd be liable to take incorrect action on labelling.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


More information about the libvir-list mailing list