From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id B21DC1FF0A7 for ; Mon, 17 Aug 2026 11:37:53 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 8E55A23C46; Mon, 17 Aug 2026 11:36:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=genua.de; s=202307; t=1786958972; bh=9+SkW8nWhlvMi3fZoT9LkRvA+sukP+G36bYheRJEEao=; h=Date:From:To:Subject:References:In-Reply-To:From; b=dDJfMgmSExq/7MFUxsjaZ5fzlcRT8mizB2egsB8v9WIbj+XoO0NgpJWpdrSfSPiIm 5N1+sBDlhe5WbesLat3zhwnVUiaJGoSSeI5m+m42d87o4HbTa0FjJrmJbYH6PsbZsP IDdwQY+tGlCA7D+M0AuKiskqWOQcTmElEJFML6ZuV/gAbHmYUhItLYe8PnLHuhrF+s ql+VgrDB4da9wKsEcMB0qwiFPSGtgcVvnxDFkuXj9RPrtNkArYy4ap+Nx+Gz/y8/4T xQXKTx205dZTbzqYODkYy0vsuAx5GAVPD5tnHTEiSZB0BodANbrQ+DeR6Ka5f5vOD+ 4KFtx08uMPGKA== Date: Mon, 17 Aug 2026 11:29:30 +0200 From: Christian Ludwig To: , <-b@genua.de>, Subject: [PATCH qemu-server 08/13] Add efi-firmware support to the API Message-ID: References: MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [192.168.217.185] X-ClientProxiedBy: kch1-mta08.win.genua.de (10.208.16.108) To kch1-mta07.win.genua.de (10.208.16.107) Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg="sha-256"; boundary="----C3EDDB06653CB6A2C28EFCC94C49839E" X-SPAM-LEVEL: Spam detection results: 0 AWL 0.000 Adjusted score from AWL reputation of From: address DKIM_INVALID 0.1 DKIM or DK signature exists, but is not valid DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DMARC_PASS -0.1 DMARC pass policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) SPF_HELO_PASS -0.001 SPF: HELO matches SPF record SPF_PASS -0.001 SPF: sender matches SPF record UNPARSEABLE_RELAY 0.001 Informational: message has unparseable relay lines Message-ID-Hash: SCN7VEKIKVCZ6A5DIOYZHBVBOYWMKU24 X-Message-ID-Hash: SCN7VEKIKVCZ6A5DIOYZHBVBOYWMKU24 X-MailFrom: christian_ludwig@genua.de 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-Content-Filtered-By: Mailman/MimeDel 3.3.10 X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: ------C3EDDB06653CB6A2C28EFCC94C49839E Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Add an efi-firmware key to the POST/PUT {vmid}/config API endpoint. It needs VM.Config.HWType permission. And deleting efi-firmware from the config does not trigger volume cleanup, firmware images are shared. Note that changing the bios type requires VM.Config.Options permissions. That should probably move to the VM.Config.HWType permission, too. Signed-off-by: Christian Ludwig --- src/PVE/API2/Qemu.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/PVE/API2/Qemu.pm b/src/PVE/API2/Qemu.pm index 3320313c..6fc7c1f7 100644 --- a/src/PVE/API2/Qemu.pm +++ b/src/PVE/API2/Qemu.pm @@ -818,6 +818,7 @@ my $hwtypeoptions = { 'watchdog' => 1, 'audio0' => 1, 'rng0' => 1, + 'efi-firmware' => 1, }; my $generaloptions = { @@ -2523,6 +2524,11 @@ my $update_vm_api = sub { print "automatic pinning of machine version failed - $@" if $@; } $conf->{pending}->{$opt} = $param->{$opt}; + } elsif ($opt eq 'efi-firmware') { + PVE::Storage::check_volume_access( + $rpcenv, $authuser, $storecfg, $vmid, $param->{$opt}, + ); + $conf->{pending}->{$opt} = $param->{$opt}; } elsif ($opt eq 'cipassword') { if (!PVE::QemuServer::Helpers::windows_version($conf->{ostype})) { # Same logic as in cloud-init (but with the regex fixed...) -- 2.34.1 ------C3EDDB06653CB6A2C28EFCC94C49839E--