KVM can only be used when the host arch matches the vCPU arch.
Signed-off-by: Fiona Ebner <[email protected]>
---
src/PVE/QemuServer.pm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index 7a0a2606..ebb6ae19 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -2939,7 +2939,8 @@ sub vga_conf_has_spice {
sub query_supported_cpu_flags {
my ($arch) = @_;
- $arch //= get_host_arch();
+ my $host_arch = get_host_arch();
+ $arch //= $host_arch;
my $default_machine =
PVE::QemuServer::Machine::default_machine_for_arch($arch);
my $flags = {};
@@ -2949,7 +2950,7 @@ sub query_supported_cpu_flags {
die "QEMU/KVM cannot detect CPU flags on ARM (aarch64)\n"
if $arch eq "aarch64";
- my $kvm_supported = defined(kvm_version());
+ my $kvm_supported = defined(kvm_version()) && $arch eq $host_arch;
my $qemu_cmd = PVE::QemuServer::Helpers::get_command_for_arch($arch);
my $fakevmid = -1;
my $pidfile = PVE::QemuServer::Helpers::vm_pidfile_name($fakevmid);
--
2.47.3
_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel