[pve-devel] [PATCH manager 1/2] 5to6: add check for running kernel version

Fabian Grünbichler f.gruenbichler at proxmox.com
Thu Jun 27 21:02:02 CEST 2019


Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
 PVE/CLI/pve5to6.pm | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/PVE/CLI/pve5to6.pm b/PVE/CLI/pve5to6.pm
index 94535776..98b35594 100644
--- a/PVE/CLI/pve5to6.pm
+++ b/PVE/CLI/pve5to6.pm
@@ -129,6 +129,15 @@ sub check_pve_packages {
 	} else {
 	    log_fail("proxmox-ve package is too old, please upgrade to >= $min_pve_ver!");
 	}
+	print "\nChecking running kernel version..\n";
+	my $kernel_ver = $proxmox_ve->{RunningKernel};
+	if (!defined($kernel_ver)) {
+	    log_fail("unable to determine running kernel version.");
+	} elsif ($kernel_ver =~ /^5\./) {
+	    log_pass("expected running kernel '$kernel_ver'.");
+	} else {
+	    log_warn("unexpected running kernel '$kernel_ver'.");
+	}
     }
 }
 
-- 
2.20.1





More information about the pve-devel mailing list