public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: Thomas Ellmenreich <t.ellmenreich@proxmox.com>,
	pve-devel@lists.proxmox.com
Subject: Re: [PATCH qemu-server 3/5] drive: read actual size when cloning TPM drive
Date: Tue, 20 Oct 2026 14:28:55 +0200	[thread overview]
Message-ID: <b3198971-0e0d-4159-8043-b51e13797696@proxmox.com> (raw)
In-Reply-To: <20261019095346.175659-4-t.ellmenreich@proxmox.com>

The commit subject should start with "clone disk:"

Am 19.10.26 um 11:53 AM schrieb Thomas Ellmenreich:
> When cloning a TPM drive, don't assume the default size of 4MiB, instead
> read and then use the actual size. The default size is constant, but can
> be changed, if the granularity of the backing storage is bigger than 4MiB.

Style nit: line too long.

> 
> This allows TPM storages larger than 4MiB be moved to different storages

Replace "TPM storages larger than" with "TPM volumes on storages with a
granularity larger than".

> without producing an error.
> 
> Suggested-by: Fiona Ebner <f.ebner@proxmox.com>
> Signed-off-by: Thomas Ellmenreich <t.ellmenreich@proxmox.com>

Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>

> ---
>  src/PVE/QemuServer.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
> index 89192e9f..c93fd4c5 100644
> --- a/src/PVE/QemuServer.pm
> +++ b/src/PVE/QemuServer.pm
> @@ -7876,7 +7876,7 @@ sub clone_disk {
>          } elsif ($dst_drivename eq 'efidisk0') {
>              $size = $efisize or die "internal error - need to specify EFI disk size\n";
>          } elsif ($dst_drivename eq 'tpmstate0') {
> -            $size = PVE::QemuServer::Drive::TPMSTATE_DISK_SIZE;
> +            $size = get_tpmstate_size($drive->{file}, $storecfg);
>          } else {
>              clone_disk_check_io_uring(
>                  $vmid, $drive, $storecfg, $src_storeid, $storeid, $use_drive_mirror,





  reply	other threads:[~2026-10-20 12:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-19  9:53 [RFC qemu-server 0/5] drive: account for differing TPM sizes Thomas Ellmenreich
2026-10-19  9:53 ` [PATCH qemu-server 1/5] drive: improve and extend TPM drive size helpers Thomas Ellmenreich
2026-10-20 12:28   ` Fiona Ebner
2026-10-19  9:53 ` [PATCH qemu-server 2/5] drive: update TPM size on creation Thomas Ellmenreich
2026-10-20 12:28   ` Fiona Ebner
2026-10-19  9:53 ` [PATCH qemu-server 3/5] drive: read actual size when cloning TPM drive Thomas Ellmenreich
2026-10-20 12:28   ` Fiona Ebner [this message]
2026-10-19  9:53 ` [PATCH qemu-server 4/5] tests: make qm mock accept disk command Thomas Ellmenreich
2026-10-20 12:28   ` Fiona Ebner
2026-10-19  9:53 ` [PATCH qemu-server 5/5] drive: rescan drives after migrating to different storage Thomas Ellmenreich
2026-10-20 12:28   ` Fiona Ebner
2026-10-20 12:28 ` [RFC qemu-server 0/5] drive: account for differing TPM sizes Fiona Ebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b3198971-0e0d-4159-8043-b51e13797696@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=t.ellmenreich@proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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