From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 07E911FF0A7 for ; Wed, 16 Sep 2026 11:08:12 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 3AFC6215CC; Wed, 16 Sep 2026 11:07:52 +0200 (CEST) From: Jonas Theisen To: pve-devel@lists.proxmox.com Subject: [PATCH qemu-server 4/5] api: Integrate new privilege VM.Reboot Date: Wed, 16 Sep 2026 11:06:58 +0200 Message-ID: <20260916090715.72307-5-j.theisen@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260916090715.72307-1-j.theisen@proxmox.com> References: <20260916090715.72307-1-j.theisen@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1789549661654 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.259 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 2HN6Q44P7KI77H6HDFTLJRZ4ZJMOS4UO X-Message-ID-Hash: 2HN6Q44P7KI77H6HDFTLJRZ4ZJMOS4UO X-MailFrom: j.theisen@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Allow users with the new VM.Reboot privilege to reboot and reset a VM but not start or shut it down. Signed-off-by: Jonas Theisen --- src/PVE/API2/Qemu.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm index 71247eec..ae8ce40f 100644 --- a/src/PVE/API2/Qemu.pm +++ b/src/PVE/API2/Qemu.pm @@ -3808,7 +3808,11 @@ __PACKAGE__->register_method({ proxyto => 'node', description => "Reset virtual machine.", permissions => { - check => ['perm', '/vms/{vmid}', ['VM.PowerMgmt']], + check => [ + 'or', + ['perm', '/vms/{vmid}', ['VM.PowerMgmt']], + ['perm', '/vms/{vmid}', ['VM.Reboot']], + ], }, parameters => { additionalProperties => 0, @@ -3978,7 +3982,11 @@ __PACKAGE__->register_method({ description => "Reboot the VM by shutting it down, and starting it again. Applies pending changes.", permissions => { - check => ['perm', '/vms/{vmid}', ['VM.PowerMgmt']], + check => [ + 'or', + ['perm', '/vms/{vmid}', ['VM.PowerMgmt']], + ['perm', '/vms/{vmid}', ['VM.Reboot']], + ], }, parameters => { additionalProperties => 0, -- 2.47.3