Snippets

RuWeb.net PVE patches

Created by Andrey Chesnakov
--- /usr/share/perl5/PVE/API2/Qemu.pm.orig      2019-04-04 17:22:10.000000000 +0300
+++ /usr/share/perl5/PVE/API2/Qemu.pm   2019-11-18 22:02:25.359895370 +0300
@@ -540,6 +540,12 @@
            } else {
                PVE::Storage::check_volume_access($rpcenv, $authuser, $storecfg, $vmid, $archive);
                $archive = PVE::Storage::abs_filesystem_path($storecfg, $archive);
+### VM conf check begin ###
+               my $config_bak = PVE::Storage::extract_vzdump_config($storecfg, $archive);
+               $config_bak =~ s/\n#qmdump#map:scsi0:drive-scsi0:zfs:://;
+               my $config_raw = PVE::Tools::file_get_contents($filename);
+               die "Config inside backup doesn't match current VM config" if ($config_bak ne $config_raw);
+### VM conf check end ###
            }
        }

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.