[pve-devel] [PATCH qemu-server 2/2] backup: prepare: improve error messages

Fiona Ebner f.ebner at proxmox.com
Mon Mar 27 11:01:06 CEST 2023


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

diff --git a/PVE/VZDump/QemuServer.pm b/PVE/VZDump/QemuServer.pm
index 036a7228..af197882 100644
--- a/PVE/VZDump/QemuServer.pm
+++ b/PVE/VZDump/QemuServer.pm
@@ -123,7 +123,7 @@ sub prepare {
 	if ($storeid) {
 	    # The call in list context can be expensive for certain plugins like RBD, just get size
 	    $size = eval { PVE::Storage::volume_size_info($self->{storecfg}, $volid, 5) };
-	    die "no such volume '$volid'\n" if $@;
+	    die "cannot determine size of volume '$volid' - $@\n" if $@;
 
 	    my $scfg = PVE::Storage::storage_config($self->{storecfg}, $storeid);
 	    $format = PVE::QemuServer::qemu_img_format($scfg, $volname);
@@ -131,7 +131,7 @@ sub prepare {
 	    ($size, $format) = eval {
 		PVE::Storage::volume_size_info($self->{storecfg}, $volid, 5);
 	    };
-	    die "no such volume '$volid'\n" if $@;
+	    die "cannot determine size and format of volume '$volid' - $@\n" if $@;
 	}
 
 	my $diskinfo = {
-- 
2.30.2






More information about the pve-devel mailing list