[pve-devel] [PATCH qemu-server] clone disk: force raw format for TPM state
Fabian Ebner
f.ebner at proxmox.com
Wed Feb 16 11:47:49 CET 2022
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 at 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
More information about the pve-devel
mailing list