From: Fabian Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server] clone disk: force raw format for TPM state
Date: Wed, 16 Feb 2022 11:47:49 +0100 [thread overview]
Message-ID: <20220216104749.47039-1-f.ebner@proxmox.com> (raw)
The format can't be qcow2 for TPM state, because swtpm reads the file
directly expecting raw data.
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
The DiskStorageSelector in the UI hides the format for TPM state, but
still sends along format=qcow2 triggering this bug. Still, the fix
should be in the backend.
PVE/QemuServer.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index a99f1a5..9cefcc0 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -7593,6 +7593,7 @@ sub clone_disk {
} elsif ($drivename eq 'efidisk0') {
$size = get_efivars_size($conf);
} elsif ($drivename eq 'tpmstate0') {
+ $dst_format = 'raw';
$size = PVE::QemuServer::Drive::TPMSTATE_DISK_SIZE;
} else {
($size) = PVE::Storage::volume_size_info($storecfg, $drive->{file}, 10);
--
2.30.2
next reply other threads:[~2022-02-16 10:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-16 10:47 Fabian Ebner [this message]
2022-02-17 13:33 ` [pve-devel] applied: " Thomas Lamprecht
2022-02-17 13:55 ` Fabian 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=20220216104749.47039-1-f.ebner@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=pve-devel@lists.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