[PATCH pve-manager] [multiarch] pvestatd: don't query supported CPU flags if we are not x86_64
Jing Luo
jing at jing.rocks
Sun Mar 30 18:28:49 CEST 2025
Only qemu-system-x86_64 will output a list of cpuflags, so let's only
do it on x86_64. For now, we don't consider the case of non-x86, and
it silences warnings on non-x86:
(e.g. on aarch64, riscv64)
Mar 31 00:20:24 debian1 pvestatd[58071]: warning: failed querying supported tcg flags: QEMU flag querying VM exited with code -1 at /usr/share/perl5/PVE/QemuServer.pm line 3312.
Mar 31 00:20:24 debian1 pvestatd[58071]: CPU flag detection failed, will try again after delay
(e.g. on powerpc64, powerpc64le)
Mar 31 00:24:25 debian2 pvestatd[58071]: VM -1 qmp command failed - VM -1 qmp command 'query-cpu-model-expansion' failed - The command query-cpu-model-expansion has not been found
Mar 31 00:24:25 debian2 pvestatd[58071]: warning: failed querying supported tcg flags: VM -1 qmp command 'query-cpu-model-expansion' failed - The command query-cpu-model-expansion has not been found
Mar 31 00:24:25 debian2 pvestatd[58071]: CPU flag detection failed, will try again after delay
Signed-off-by: Jing Luo <jing at jing.rocks>
---
PVE/Service/pvestatd.pm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/PVE/Service/pvestatd.pm b/PVE/Service/pvestatd.pm
index 4911d4ac..f5580aec 100755
--- a/PVE/Service/pvestatd.pm
+++ b/PVE/Service/pvestatd.pm
@@ -9,7 +9,7 @@ use PVE::Daemon;
use JSON;
use Time::HiRes qw (gettimeofday);
-use PVE::Tools qw(dir_glob_foreach file_read_firstline);
+use PVE::Tools qw(dir_glob_foreach file_read_firstline get_host_arch);
use PVE::ProcFSTools;
use PVE::CpuSet;
use Filesys::Df;
@@ -156,7 +156,9 @@ sub update_node_status {
my $cpuinfo = PVE::ProcFSTools::read_cpuinfo();
my $maxcpu = $cpuinfo->{cpus};
- update_supported_cpuflags();
+ # only qemu-system-x86_64 can output cpuflags with "-cpu help"
+ my $arch = PVE::Tools::get_host_arch();
+ update_supported_cpuflags() if $arch eq "x86_64";
my $netdev = PVE::ProcFSTools::read_proc_net_dev();
# traffic from/to physical interface cards
--
2.49.0
More information about the pve-devel
mailing list