From a77a53ae54586db0460dcd575cbc79be77372632 Mon Sep 17 00:00:00 2001 From: Stefan Reiter Date: Mon, 9 Dec 2019 16:14:10 +0100 Subject: [PATCH] check if QEMU version is recent enough for machine type ...and show the user a more meaningful error otherwise. Signed-off-by: Stefan Reiter --- PVE/QemuServer.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index e10461f..07cd7fe 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -3472,6 +3472,10 @@ sub config_to_command { my $machine_version = PVE::QemuServer::Machine::extract_version($machine_type, $kvmver); $kvm //= 1 if is_native($arch); + $machine_version =~ m/(\d+)\.(\d+)/; + die "QEMU version $kvmver is too old to run machine type $machine_type\n" + if !PVE::QemuServer::min_version($kvmver, $1, $2); + if ($kvm) { die "KVM virtualisation configured, but not available. Either disable in VM configuration or enable in BIOS.\n" if !defined kvm_version(); -- 2.39.2