[pve-devel] [PATCH qemu-server] disk import: warn when fallback is used instead of requested format

Fiona Ebner f.ebner at proxmox.com
Mon Mar 11 10:46:30 CET 2024


Might avoid some confusion. Reported in the community forum:
https://forum.proxmox.com/threads/142988/

Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
 PVE/QemuServer/ImportDisk.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/PVE/QemuServer/ImportDisk.pm b/PVE/QemuServer/ImportDisk.pm
index 3e0474b6..132932ae 100755
--- a/PVE/QemuServer/ImportDisk.pm
+++ b/PVE/QemuServer/ImportDisk.pm
@@ -28,6 +28,8 @@ sub do_import {
     # get target format, target image's path, and whether it's possible to sparseinit
     my $storecfg = PVE::Storage::config();
     my $dst_format = PVE::QemuServer::resolve_dst_disk_format($storecfg, $storage_id, undef, $format);
+    warn "format '$format' is not supported by the target storage - using '$dst_format' instead\n"
+	if $format && $format ne $dst_format;
 
     my $dst_volid = PVE::Storage::vdisk_alloc($storecfg, $storage_id, $vmid, $dst_format, undef, $src_size / 1024);
 
-- 
2.39.2





More information about the pve-devel mailing list