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 DDEB61FF0DE for ; Thu, 19 Nov 2026 15:14:19 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id C986721700; Thu, 19 Nov 2026 15:14:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=genua.de; s=202307; t=1795097646; bh=A+g1mf+rVRbeGKyZmRPsNWs75wPaJign6aZ4hI5l8IQ=; h=Date:From:To:Subject:From; b=gcFJl4O/rgdTWOGzmxP4vhn43pFvfHz5GndOm3yvdyWfCwY1qFOZ/qLuHhWX4XLxN ZIklgS6cP5izsNxE7n97LMey89mozFmJ4ukdQV4YfXLrJRtE0Fw/qDpoLd2j+XyQsx LVHSevr8w1D/8qli2Z9uKIs4EsGDyH8gvm1kcNGgp2Myi5+p9WeazEyMoNKyZQ0dn1 ekAuV/8uvKjxinwq4lBW6p9kKzB3Q4eQmV7YLjTwdGIrNHRyMEM6cL3+D2FsS+pF7S eg6ozu8B2tWRLV3ulP1qZ3EtSaR/ugPF6UmqcPPLO3pnnHkSnu1hxCAVcDZcxKBjKB E3swrddWuEsbQ== Date: Thu, 19 Nov 2026 15:14:05 +0100 From: Christian Ludwig To: Subject: [PATCH v4 00/20] Support for custom EFI firmware Message-ID: MIME-Version: 1.0 X-Originating-IP: [192.168.217.185] X-ClientProxiedBy: kch1-mta07.win.genua.de (10.208.16.107) To kch1-mta07.win.genua.de (10.208.16.107) Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline X-SPAM-LEVEL: Spam detection results: 0 AWL 0.062 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 RCVD_IN_DNSWL_NONE -0.0001 Sender listed at https://www.dnswl.org/, no trust 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: 2V3G2H5RUEZLQMKL4CX2MBILWFHTUOQC X-Message-ID-Hash: 2V3G2H5RUEZLQMKL4CX2MBILWFHTUOQC 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-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Hi, here is an updated patch series that brings support for custom UEFI firmware images. You can find the v3 series at [1], the v2 series at [2] and the v1 series at [3] for reference. In Confidential Computing the aim is to not trust the hypervisor, yet it runs its bundled firmware in each VM. Some VM appliances also ship their own firmware images. This series allows to bring your own firmware for OVMF based VMs. Today the Proxmox-VE API allows to import a custom efidisk0 (EFIVAR) already. EFI firmware and EFIVAR data have to match. Otherwise, the VM might not boot anymore. Therefore, with this series you can set a custom EFI firmware via the API, along with a custom efidisk. But these are two steps. And there is no safety net. The GUI is missing a way to set a custom EFIVAR. So this series only allows to set a custom firmware image for confidential computing VMs that do not need EFIVAR storage. The defaults do not change. pve-storage: - Declares the new 'efi-firmware' content type for file based storage. - Provides upload/download API. File names are restricted to the safe character set, because they are used as sub-properties in the GUI. File extensions are restricted to '.fd'. So the efi-firmware storage can host other types as well in the future. qemu-server: - Extends the 'bios' property with an optional 'firmware' sub-property with an efi-firmware storage location. - The 'firmware' sub-property is only allowed to be set for OVMF based VMs. - Adds API plumbing. The image is never replicated or copied, so migration requires it on a shared storage. pve-manager: - Adds UI plumbing for the 'efi-firmware' storage content type. - Extends the BIOS chooser dialog with an 'OVMF (custom)' option to select the firmware sub-property. - Restricts custom firmware selection to confidential computing VMs. pve-docs: - Adds a custom firmware subsection in the BIOS section. Changes in v4: - Rebased onto current master and adapted to the changed storage API: guest volumes now have their own volume types ('vm-vol', 'vm-state', 'ct-vol'), with 'images' and 'rootdir' as generic content types, and content types are checked with content_allows(). efi-firmware volumes are not guest volumes, so they behave as before. pve-storage: - Collected Reviewed-by tags. - plugin: add efi-firmware content type - Mention efi-firmware in the comment above $get_subdir_files. - Carry the positive parse_volname test, as upstream re-enabled the check that every content type with a directory has one. - New patch "plugin: allow overriding the efi-firmware directory" - The directory overrides of 'content-dirs' did not accept content types with hyphens. - Volume types of guests are refused, as they share the directory of their generic type. - api: status: support efi-firmware in upload and download-url - assert_efi_firmware_content(): tell format detection error apart from format type error. - assert_efi_firmware_content(): drop the 10 second timeout of the format check, like assert_iso_content(), whose qemu-img call it mirrors. qemu-server: - config: define bios schema as property-string - Use v5.36 and subroutine signatures in the new BIOS module. - Move the 'seabios' default from the bios option into its 'type' sub-property. - Import get_bios_type() in QemuConfig. - bios: add a custom firmware sub-property - check_bios() takes the property-string and parses it itself. - Die when printing 'bios' as a volume, instead of printing it. - Skip the custom firmware image explicitly for replication. - Do not deactivate the custom firmware image when the VM stops (via a new flag for get_vm_volumes()) or fails to start. - Include the custom firmware image in the storage availability checks for migration and cloning, like ISO images. - Mention the volume ID in the migration error for a local custom firmware image. - Reword the error for remote migration with a custom firmware image. - api: check the custom firmware of the bios option - Use a lexical sub for check_bios_param(). - Avoid the multiline post-if in $check_storage_access. - test: custom firmware in the bios option - Adapt to the cfg2cmd test mocks, which moved to QemuServerTest::CommandLineMocks. - test: custom firmware volumes in replication and migration - Adapt to the reworded migration error. pve-manager: - ui: migrate: refuse migration with a local custom firmware image - Do not count the custom firmware image as a VM volume when the target storages are filtered by volume type. pve-docs: - No changes. Thanks Fiona Ebner for reviewing the low-level changes. More tests and feedback are welcome. In particular for the GUI changes. - Christian [1] https://lore.proxmox.com/pve-devel/cover.1793029144.git@genua.de/ [2] https://lore.proxmox.com/pve-devel/cover.1790337423.git@genua.de/ [3] https://lore.proxmox.com/pve-devel/20260817115919.abQyMsVBJeHupthBjG6HbiJWe2o8RfIy9CmAttembto@z/