From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH qemu-server 2/3] partially fix #6805: api: modify vm config: privilege checks for VM-state-related properties
Date: Thu, 18 Sep 2025 11:38:41 +0200 [thread overview]
Message-ID: <20250918093842.16059-3-f.ebner@proxmox.com> (raw)
In-Reply-To: <20250918093842.16059-1-f.ebner@proxmox.com>
Currently, the VM-state-related properties 'runningcpu' and
'runningmachine' are not supposed to end up in the VM configuration of
a remote-migratable VM, because a suspended VM is not yet migratable.
However, there was a bug and the properties were not removed after
cloning from a snapshot, see commit "partially fix #6805: api: clone:
properly remove all snapshot-related info". Upon remote migration, the
property would be encountered and would be limited to root@pam only.
To aid fixing bug #6805, do proper privilege checking for
configuration properties related to the running VM state.
Note that the 'vmstate' property is already checked for in the
check_vm_modify_config_perm() helper. Note that VM-state-related
properties cannot be set via API by a user.
Originally-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Link: https://lore.proxmox.com/20250917163038.488710-3-f.ebner@proxmox.com
(cherry picked from commit 7c05f0be9858543272c1254c83f4dfc266b97fe2)
[FE: drop running-nets-host-mtu which does not exist in PVE 8]
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
src/PVE/API2/Qemu.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm
index 5af117ba..8b990371 100644
--- a/src/PVE/API2/Qemu.pm
+++ b/src/PVE/API2/Qemu.pm
@@ -721,6 +721,7 @@ my $check_cpu_model_access = sub {
my $cpuoptions = {
'cores' => 1,
'cpu' => 1,
+ 'runningcpu' => 1,
'cpulimit' => 1,
'cpuunits' => 1,
'numa' => 1,
@@ -740,6 +741,7 @@ my $hwtypeoptions = {
'hotplug' => 1,
'kvm' => 1,
'machine' => 1,
+ 'runningmachine' => 1,
'scsihw' => 1,
'smbios1' => 1,
'tablet' => 1,
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-09-18 9:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-18 9:38 [pve-devel] [PATCH-SERIES qemu-server stable-bookworm 0/3] VM-state property handling improvements Fiona Ebner
2025-09-18 9:38 ` [pve-devel] [PATCH qemu-server 1/3] partially fix #6805: api: clone: properly remove all snapshot-related info Fiona Ebner
2025-09-18 9:38 ` Fiona Ebner [this message]
2025-09-18 9:38 ` [pve-devel] [PATCH qemu-server 3/3] vm start: remove left-over VM-state-related properties Fiona Ebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250918093842.16059-3-f.ebner@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox