]> git.proxmox.com Git - qemu-server.git/commitdiff
disk import: warn when fallback is used instead of requested format
authorFiona Ebner <f.ebner@proxmox.com>
Mon, 11 Mar 2024 09:46:30 +0000 (10:46 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 14 Mar 2024 13:01:12 +0000 (14:01 +0100)
Might avoid some confusion. Reported in the community forum:
https://forum.proxmox.com/threads/142988/

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
PVE/QemuServer/ImportDisk.pm

index 3e0474b6780ce019b97dbde91a79469f64f12b22..132932aeb460f9eba562e930569b91aef606ff6f 100755 (executable)
@@ -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);