* [PATCH-SERIES qemu/qemu-server 0/3] api: machines: allow querying machines for a given architecture
@ 2026-01-29 14:09 Fiona Ebner
2026-01-29 14:09 ` [PATCH qemu 1/3] buildsys: generate list of supported aarch64 machines during package build Fiona Ebner
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Fiona Ebner @ 2026-01-29 14:09 UTC (permalink / raw)
To: pve-devel
If the QEMU package doesn't ship the file yet, the call for aarch64
will just fail, but since ARM host support is just starting out, that
seems acceptable.
The patch introducing the pve-qm-cpu-arch standard option is a
resubmission of the one from the series for CPU types:
https://lore.proxmox.com/pve-devel/20260129131021.118199-1-f.ebner@proxmox.com/
qemu:
Fiona Ebner (1):
buildsys: generate list of supported aarch64 machines during package
build
debian/parse-machines.pl | 2 +-
debian/rules | 9 +++++++--
2 files changed, 8 insertions(+), 3 deletions(-)
qemu-server:
Fiona Ebner (2):
cpu config: introduce pve-qm-cpu-arch standard option for virtual CPU
architecture
api: machines: allow querying machines for a given architecture
src/PVE/API2/Qemu/Machine.pm | 12 +++++++++---
src/PVE/QemuServer.pm | 7 +------
src/PVE/QemuServer/CPUConfig.pm | 7 +++++++
3 files changed, 17 insertions(+), 9 deletions(-)
Summary over all repositories:
5 files changed, 25 insertions(+), 12 deletions(-)
--
Generated by git-murpp 0.5.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH qemu 1/3] buildsys: generate list of supported aarch64 machines during package build
2026-01-29 14:09 [PATCH-SERIES qemu/qemu-server 0/3] api: machines: allow querying machines for a given architecture Fiona Ebner
@ 2026-01-29 14:09 ` Fiona Ebner
2026-01-29 14:09 ` [PATCH qemu-server 2/3] cpu config: introduce pve-qm-cpu-arch standard option for virtual CPU architecture Fiona Ebner
2026-01-29 14:09 ` [PATCH qemu-server 3/3] api: machines: allow querying machines for a given architecture Fiona Ebner
2 siblings, 0 replies; 4+ messages in thread
From: Fiona Ebner @ 2026-01-29 14:09 UTC (permalink / raw)
To: pve-devel
Similar to what is already done for x86_64.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
debian/parse-machines.pl | 2 +-
debian/rules | 9 +++++++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/debian/parse-machines.pl b/debian/parse-machines.pl
index a0f449c..a6c0e8d 100755
--- a/debian/parse-machines.pl
+++ b/debian/parse-machines.pl
@@ -14,7 +14,7 @@ while (<STDIN>) {
s/^\s+//;
my @machine = split(/\s+/);
- next if $machine[0] !~ m/^pc-(i440fx|q35)-(.+)$/;
+ next if $machine[0] !~ m/^pc-(i440fx|q35)-(.+)$/ && $machine[0] !~ m/^(virt)-(.+)$/;
push @$machines, {
'id' => $machine[0],
'type' => $1,
diff --git a/debian/rules b/debian/rules
index 7c08331..c407172 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,7 +10,9 @@ PACKAGE=pve-qemu-kvm
destdir := $(CURDIR)/debian/$(PACKAGE)
flagfile := $(destdir)/usr/share/kvm/recognized-CPUID-flags-x86_64
-machinefile := $(destdir)/usr/share/kvm/machine-versions-x86_64.json
+
+machine_file_x86_64 := $(destdir)/usr/share/kvm/machine-versions-x86_64.json
+machine_file_aarch64 := $(destdir)/usr/share/kvm/machine-versions-aarch64.json
# default QEMU out-of-tree build directory is ./build
BUILDDIR=build
@@ -119,7 +121,10 @@ install: build
# CPU flags are static for QEMU version, allows avoiding more costly checks
$(destdir)/usr/bin/qemu-system-x86_64 -cpu help | ./debian/parse-cpu-flags.pl > $(flagfile)
- $(destdir)/usr/bin/qemu-system-x86_64 -machine help | ./debian/parse-machines.pl > $(machinefile)
+
+ # Supported machine versions are static for a given QEMU binary.
+ $(destdir)/usr/bin/qemu-system-x86_64 -machine help | ./debian/parse-machines.pl > $(machine_file_x86_64)
+ $(destdir)/usr/bin/qemu-system-aarch64 -machine help | ./debian/parse-machines.pl > $(machine_file_aarch64)
# Build architecture-independent files here.
binary-indep: build install
--
2.47.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH qemu-server 2/3] cpu config: introduce pve-qm-cpu-arch standard option for virtual CPU architecture
2026-01-29 14:09 [PATCH-SERIES qemu/qemu-server 0/3] api: machines: allow querying machines for a given architecture Fiona Ebner
2026-01-29 14:09 ` [PATCH qemu 1/3] buildsys: generate list of supported aarch64 machines during package build Fiona Ebner
@ 2026-01-29 14:09 ` Fiona Ebner
2026-01-29 14:09 ` [PATCH qemu-server 3/3] api: machines: allow querying machines for a given architecture Fiona Ebner
2 siblings, 0 replies; 4+ messages in thread
From: Fiona Ebner @ 2026-01-29 14:09 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
src/PVE/QemuServer.pm | 7 +------
src/PVE/QemuServer/CPUConfig.pm | 7 +++++++
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index 341b4321..dae72c40 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -637,12 +637,7 @@ EODESCR
. ' This is used internally for snapshots.',
},
machine => get_standard_option('pve-qemu-machine'),
- arch => {
- description => "Virtual processor architecture. Defaults to the host.",
- optional => 1,
- type => 'string',
- enum => [qw(x86_64 aarch64)],
- },
+ arch => get_standard_option('pve-qm-cpu-arch', { optional => 1 }),
smbios1 => {
description => "Specify SMBIOS type 1 fields.",
type => 'string',
diff --git a/src/PVE/QemuServer/CPUConfig.pm b/src/PVE/QemuServer/CPUConfig.pm
index ec418e73..6240807b 100644
--- a/src/PVE/QemuServer/CPUConfig.pm
+++ b/src/PVE/QemuServer/CPUConfig.pm
@@ -25,6 +25,13 @@ our @EXPORT_OK = qw(
get_cvm_type
);
+my $arch_desc = {
+ description => "Virtual processor architecture. Defaults to the host architecture.",
+ type => 'string',
+ enum => [qw(x86_64 aarch64)],
+};
+PVE::JSONSchema::register_standard_option("pve-qm-cpu-arch", $arch_desc);
+
# under certain race-conditions, this module might be loaded before pve-cluster
# has started completely, so ensure we don't prevent the FUSE mount with our dir
if (PVE::Cluster::check_cfs_is_mounted(1)) {
--
2.47.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH qemu-server 3/3] api: machines: allow querying machines for a given architecture
2026-01-29 14:09 [PATCH-SERIES qemu/qemu-server 0/3] api: machines: allow querying machines for a given architecture Fiona Ebner
2026-01-29 14:09 ` [PATCH qemu 1/3] buildsys: generate list of supported aarch64 machines during package build Fiona Ebner
2026-01-29 14:09 ` [PATCH qemu-server 2/3] cpu config: introduce pve-qm-cpu-arch standard option for virtual CPU architecture Fiona Ebner
@ 2026-01-29 14:09 ` Fiona Ebner
2 siblings, 0 replies; 4+ messages in thread
From: Fiona Ebner @ 2026-01-29 14:09 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
src/PVE/API2/Qemu/Machine.pm | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/PVE/API2/Qemu/Machine.pm b/src/PVE/API2/Qemu/Machine.pm
index 0fc1ea6c..26195eae 100644
--- a/src/PVE/API2/Qemu/Machine.pm
+++ b/src/PVE/API2/Qemu/Machine.pm
@@ -6,9 +6,10 @@ use warnings;
use JSON;
use PVE::JSONSchema qw(get_standard_option);
-use PVE::QemuServer::Machine;
use PVE::RESTHandler;
-use PVE::Tools qw(file_get_contents);
+use PVE::Tools qw(extract_param file_get_contents get_host_arch);
+
+use PVE::QemuServer::Machine;
use base qw(PVE::RESTHandler);
@@ -25,6 +26,7 @@ __PACKAGE__->register_method({
additionalProperties => 0,
properties => {
node => get_standard_option('pve-node'),
+ arch => get_standard_option('pve-qm-cpu-arch', { optional => 1 }),
},
},
returns => {
@@ -56,8 +58,12 @@ __PACKAGE__->register_method({
},
},
code => sub {
+ my ($param) = @_;
+
+ my $arch = extract_param($param, 'arch') // get_host_arch();
+
my $supported_machine_list = eval {
- my $raw = file_get_contents('/usr/share/kvm/machine-versions-x86_64.json');
+ my $raw = file_get_contents("/usr/share/kvm/machine-versions-$arch.json");
my $machines = from_json($raw, { utf8 => 1 });
my $pve_machines = [];
--
2.47.3
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-01-29 14:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-29 14:09 [PATCH-SERIES qemu/qemu-server 0/3] api: machines: allow querying machines for a given architecture Fiona Ebner
2026-01-29 14:09 ` [PATCH qemu 1/3] buildsys: generate list of supported aarch64 machines during package build Fiona Ebner
2026-01-29 14:09 ` [PATCH qemu-server 2/3] cpu config: introduce pve-qm-cpu-arch standard option for virtual CPU architecture Fiona Ebner
2026-01-29 14:09 ` [PATCH qemu-server 3/3] api: machines: allow querying machines for a given architecture Fiona Ebner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox