[pve-devel] [PATCH] fix #146 add name and vm notes to backup log.

Wolfgang Link w.link at proxmox.com
Tue Jun 14 08:14:55 CEST 2016


---
 PVE/VZDump.pm | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
index 1e00c2d..0280568 100644
--- a/PVE/VZDump.pm
+++ b/PVE/VZDump.pm
@@ -853,6 +853,17 @@ sub exec_backup_task {
 	# lock VM (prevent config changes)
 	$plugin->lock_vm ($vmid);
 
+	my $conf = PVE::QemuConfig->load_config($vmid);
+
+	debugmsg ('info',  "VM Name: $conf->{name}", $logfd, 1);
+	if ($conf->{description}) {
+	    my @lines = split(/\n/, $conf->{description});
+	    debugmsg ('info',  "VM Notes:", $logfd, 1);
+	    foreach my $line ( @lines ) {
+		debugmsg ('info',  "\t$line", $logfd, 1);
+	    }
+	}
+
 	$cleanup->{unlock} = 1;
 
 	# prepare
-- 
2.1.4





More information about the pve-devel mailing list