[pve-devel] [PATCH qemu-server] Ignore version checks when using QEMU -rc releases

Stefan Reiter s.reiter at proxmox.com
Wed Apr 8 17:11:07 CEST 2020


Upstream marks these as having a micro-version of >=90, unfortunately the
machine versions are bumped earlier so testing them is made unnecessarily
difficult, since the version checking code would abort on migrations etc...

Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
---
 PVE/QemuServer.pm | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index e9eb421..4d05db3 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2973,13 +2973,18 @@ sub config_to_command {
 
     $machine_version =~ m/(\d+)\.(\d+)/;
     my ($machine_major, $machine_minor) = ($1, $2);
-    die "Installed QEMU version '$kvmver' is too old to run machine type '$machine_type', please upgrade node '$nodename'\n"
-	if !PVE::QemuServer::min_version($kvmver, $machine_major, $machine_minor);
 
-    if (!PVE::QemuServer::Machine::can_run_pve_machine_version($machine_version, $kvmver)) {
-	my $max_pve_version = PVE::QemuServer::Machine::get_pve_version($machine_version);
-	die "Installed qemu-server (max feature level for $machine_major.$machine_minor is pve$max_pve_version)"
-	  . " is too old to run machine type '$machine_type', please upgrade node '$nodename'\n";
+    if ($kvmver =~ m/^\d+\.\d+\.(\d+)/ && $1 >= 90) {
+	warn "warning: Installed QEMU version ($kvmver) is a release candidate, ignoring version checks\n";
+    } else {
+	die "Installed QEMU version '$kvmver' is too old to run machine type '$machine_type', please upgrade node '$nodename'\n"
+	    if !PVE::QemuServer::min_version($kvmver, $machine_major, $machine_minor);
+
+	if (!PVE::QemuServer::Machine::can_run_pve_machine_version($machine_version, $kvmver)) {
+	    my $max_pve_version = PVE::QemuServer::Machine::get_pve_version($machine_version);
+	    die "Installed qemu-server (max feature level for $machine_major.$machine_minor is pve$max_pve_version)"
+	    . " is too old to run machine type '$machine_type', please upgrade node '$nodename'\n";
+	}
     }
 
     # if a specific +pve version is required for a feature, use $version_guard
-- 
2.26.0





More information about the pve-devel mailing list