[pve-devel] [PATCH qemu-server] migrate: skip tpmstate for NBD migration

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Nov 16 12:12:46 CET 2021


On 16.11.21 11:52, Fabian Grünbichler wrote:
> the tpmstate volume is not available in the VM directly, but we do
> migrate the state volume via a storage migration anyway if necessary.
> 

some context would be great to have in the commit message, iow. mentioning
that QEMU is already migrating this as part of its memory/state migration.

Also, how is "migrate -> stop -> start" affected, is the TPM synced out to
the (previously replicated?) disk on the target side during stop?

> this code path was only triggered for replicated VMs with TPM.
> 
> Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
> ---
>  PVE/QemuServer.pm | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index 580af9e..76d45a2 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -5238,6 +5238,7 @@ sub vm_migrate_get_nbd_disks {
>  	my ($ds, $drive) = @_;
>  
>  	return if drive_is_cdrom($drive);
> +	return if $ds eq 'tpmstate0';
>  
>  	my $volid = $drive->{file};
>  
> 






More information about the pve-devel mailing list