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 EABDD1FF0A7 for ; Mon, 17 Aug 2026 14:00:49 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 03D0723D4B; Mon, 17 Aug 2026 14:00:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=genua.de; s=202307; t=1786967972; bh=KYWzGV0U7Sq2ppS7yjbAVYOuGFagIGEHA/+G2Rl1uNs=; h=Date:From:To:Subject:References:In-Reply-To:From; b=Ad493a+mIkdAxuPpB5AyqBl6KdfKK3QKuVZM+x0v0U6Q5TOoLRyP2Ja/auafaiiJ2 QSZgD8ojZQU8KdS4YbGX78hvHk8ytGG6owJnvzYBAcHsnw3Sn1k2GXHg+GffuDArTG xA/mwW61WXIjkf7TLlfbWH//XPl7fQTCRYD0mhf/F1f2LLXfJQfIVJAhfwkUEaj4/c aMZbekCH6mQERxjtkxx/fjlpgo/XjMbAJf5KkU62Hjn+DTGwyHIwVzKC6UkKzNyeut dK7tOJqoL7o18DnznZ+yWY5u0SThc7HQI8E72LGns3c4xbX69RfkWcx8ckWEuDRsNm gzLI9nB8p5HzA== Date: Mon, 17 Aug 2026 13:59:30 +0200 From: Christian Ludwig To: 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="----ABC5411A87A2B8802605FAF89EB1297B" X-SPAM-LEVEL: Spam detection results: 0 AWL 0.149 Adjusted score from AWL reputation of From: address DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain DMARC_PASS -0.1 DMARC pass policy 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: BVKN2ZVDYMNKRH2UXVOPLU2ISC5OFL3I X-Message-ID-Hash: BVKN2ZVDYMNKRH2UXVOPLU2ISC5OFL3I 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: ------ABC5411A87A2B8802605FAF89EB1297B 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 ------ABC5411A87A2B8802605FAF89EB1297B--