public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH qemu-server] fix #3963: Skip TPM startup for template VMs
@ 2023-08-09  9:09 Filip Schauer
  2023-09-18 15:17 ` Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Filip Schauer @ 2023-08-09  9:09 UTC (permalink / raw)
  To: pve-devel

Skip the software TPM startup when starting a template VM for performing
a backup. This fixes an error that occurs when the TPM state disk is
write-protected.

Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
---
 PVE/QemuServer.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 484bc7f..5d7a92e 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -5923,7 +5923,7 @@ sub vm_start_nolock {
 	    PVE::Systemd::enter_systemd_scope($vmid, "Proxmox VE VM $vmid", %systemd_properties);
 
 	    my $tpmpid;
-	    if (my $tpm = $conf->{tpmstate0}) {
+	    if ((my $tpm = $conf->{tpmstate0}) && PVE::QemuConfig->is_template($conf)) {
 		# start the TPM emulator so QEMU can connect on start
 		$tpmpid = start_swtpm($storecfg, $vmid, $tpm, $migratedfrom);
 	    }
-- 
2.39.2





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [pve-devel] [PATCH qemu-server] fix #3963: Skip TPM startup for template VMs
  2023-08-09  9:09 [pve-devel] [PATCH qemu-server] fix #3963: Skip TPM startup for template VMs Filip Schauer
@ 2023-09-18 15:17 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2023-09-18 15:17 UTC (permalink / raw)
  To: Proxmox VE development discussion, Filip Schauer

Am 09/08/2023 um 11:09 schrieb Filip Schauer:
> Skip the software TPM startup when starting a template VM for performing
> a backup. This fixes an error that occurs when the TPM state disk is
> write-protected.
> 
> Signed-off-by: Filip Schauer <f.schauer@proxmox.com>
> ---
>  PVE/QemuServer.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index 484bc7f..5d7a92e 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -5923,7 +5923,7 @@ sub vm_start_nolock {
>  	    PVE::Systemd::enter_systemd_scope($vmid, "Proxmox VE VM $vmid", %systemd_properties);
>  
>  	    my $tpmpid;
> -	    if (my $tpm = $conf->{tpmstate0}) {
> +	    if ((my $tpm = $conf->{tpmstate0}) && PVE::QemuConfig->is_template($conf)) {
>  		# start the TPM emulator so QEMU can connect on start
>  		$tpmpid = start_swtpm($storecfg, $vmid, $tpm, $migratedfrom);
>  	    }


just for the record: this got superseded by a v2:
https://lists.proxmox.com/pipermail/pve-devel/2023-August/058691.html

and then later the v4 got applied:
https://lists.proxmox.com/pipermail/pve-devel/2023-August/058742.html

It's helpful to reply to a patch that it is obsolete (just something
short is more than enough), as the existence of a next patch revision
might have been overlooked by reviewers otherwise, letting them
potentially waste more time than required.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-09-18 15:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-09  9:09 [pve-devel] [PATCH qemu-server] fix #3963: Skip TPM startup for template VMs Filip Schauer
2023-09-18 15:17 ` Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal