From: Stefan Reiter Date: Mon, 9 Dec 2019 15:14:10 +0000 (+0100) Subject: check if QEMU version is recent enough for machine type X-Git-Url: https://git.proxmox.com/?p=qemu-server.git;a=commitdiff_plain;h=a77a53ae54586db0460dcd575cbc79be77372632 check if QEMU version is recent enough for machine type ...and show the user a more meaningful error otherwise. Signed-off-by: Stefan Reiter --- 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();