[pve-devel] [PATCH qemu-server 1/2] fix undefined value when starting a q35 machine VM
Thomas Lamprecht
t.lamprecht at proxmox.com
Thu Feb 25 14:47:16 CET 2016
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
---
@Alexandre - only to notify you:
You added/changed this in 249c4a6c753a43c975ffb5907273233ce4ce866a
and I saw no reason to use undef for the $kvmver parameter of the
qemu_machine_feature_enabled method.
I did not test a live migration from a 3.4 PVE to an 4.0 upgrade
(to much hassle for me for now, to be honest, and we do not support
that officially, AFAIK).
But the logic should still hold as the machine type still has
priority.
Anybody who want to use this has to set a specific machine type
to make this work anyhow (pc-q35-2.2 instead of the q35 alias)
so I see no problem but wanted to ask you nonetheless if you have
any objection with this.
PVE/QemuServer.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index c199437..bd9cf45 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -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);
--
2.1.4
More information about the pve-devel
mailing list