[pve-devel] applied: [PATCH qemu-server 4/4] check if QEMU version is recent enough for machine type
Thomas Lamprecht
t.lamprecht at proxmox.com
Tue Dec 10 11:10:09 CET 2019
On 12/9/19 4:14 PM, Stefan Reiter wrote:
> ...and show the user a more meaningful error otherwise.
>
> Signed-off-by: Stefan Reiter <s.reiter at proxmox.com>
> ---
> PVE/QemuServer.pm | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index 4317516..0201d26 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();
>
applied this one already, added a "expect error" test in cfg2cmd as
followup.
More information about the pve-devel
mailing list