]> git.proxmox.com Git - qemu-server.git/commitdiff
fix undefined value when starting a q35 machine VM
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 25 Feb 2016 13:47:16 +0000 (14:47 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 26 Feb 2016 06:48:35 +0000 (07:48 +0100)
As there the signleton function "kvm_user_version" may not have been
called and with the machine alias q35 the regex from the
qemu_machine_feature_enabled method does not match and thus we
need a valid kvm version here

PVE/QemuServer.pm

index 6a41d2bfb94400ec15b9f7b61315fedc2889a887..0fcbead8c87a02b80a9042e26c61b40d7568be20 100644 (file)
@@ -6647,11 +6647,12 @@ sub qemu_use_old_bios_files {
         $machine_type = $1;
         $use_old_bios_files = 1;
     } else {
+       my $kvmver = kvm_user_version();
         # Note: kvm version < 2.4 use non-efi pxe files, and have problems when we
         # load new efi bios files on migration. So this hack is required to allow
         # live migration from qemu-2.2 to qemu-2.4, which is sometimes used when
         # updrading from proxmox-ve-3.X to proxmox-ve 4.0
-        $use_old_bios_files = !qemu_machine_feature_enabled ($machine_type, undef, 2, 4);
+       $use_old_bios_files = !qemu_machine_feature_enabled ($machine_type, $kvmver, 2, 4);
     }
 
     return ($use_old_bios_files, $machine_type);