From: Christian Ludwig <christian_ludwig@genua.de>
To: <pve-devel@lists.proxmox.com>
Subject: [PATCH v2 pve-storage 1/16] plugin: add efi-firmware content type
Date: Mon, 28 Sep 2026 07:47:46 +0200 [thread overview]
Message-ID: <dd9d178b076ddc8110b1e83141006eaaf34a62b2.1790337423.git@genua.de> (raw)
In-Reply-To: <cover.1790337423.git@genua.de>
Holds custom OVMF code images in the efi-firmware/ subdirectory of a
storage. File names are restricted to the safe character class.
Signed-off-by: Christian Ludwig <christian_ludwig@genua.de>
---
src/PVE/Storage/Plugin.pm | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
index 4f69f9b..f6ca140 100644
--- a/src/PVE/Storage/Plugin.pm
+++ b/src/PVE/Storage/Plugin.pm
@@ -372,7 +372,7 @@ PVE::JSONSchema::register_format('pve-storage-content', \&verify_content);
sub verify_content {
my ($ct, $noerr) = @_;
- return $ct if $ct eq 'import';
+ return $ct if $ct eq 'import' || $ct eq 'efi-firmware';
my $valid_content = valid_content_types('dir'); # dir includes all other types
@@ -831,6 +831,8 @@ sub parse_volname {
m!^import/(${PVE::Storage::SAFE_CHAR_WITH_WHITESPACE_CLASS_RE}+$PVE::Storage::IMPORT_EXT_RE_1)$!
) {
return ('import', $1, undef, undef, undef, undef, $2);
+ } elsif ($volname =~ m!^efi-firmware/(${PVE::Storage::SAFE_CHAR_CLASS_RE}+)$!) {
+ return ('efi-firmware', $1, undef, undef, undef, undef, 'raw');
}
die "unable to parse directory volume name '$volname'\n";
@@ -844,6 +846,7 @@ my $vtype_subdirs = {
backup => 'dump',
snippets => 'snippets',
import => 'import',
+ 'efi-firmware' => 'efi-firmware',
};
sub get_vtype_subdirs {
@@ -1753,6 +1756,10 @@ my $get_subdir_files = sub {
m!/(${PVE::Storage::SAFE_CHAR_CLASS_RE}+$PVE::Storage::IMPORT_EXT_RE_1)$!i;
$info = { volid => "$sid:import/$1", format => "$2" };
+ } elsif ($tt eq 'efi-firmware') {
+ next if $fn !~ m!/(${PVE::Storage::SAFE_CHAR_CLASS_RE}+)$!i;
+
+ $info = { volid => "$sid:efi-firmware/$1", format => 'raw' };
}
$info->{size} = $st->size;
@@ -1789,6 +1796,8 @@ sub list_volumes {
$data = $get_subdir_files->($storeid, $path, 'snippets');
} elsif ($type eq 'import') {
$data = $get_subdir_files->($storeid, $path, 'import');
+ } elsif ($type eq 'efi-firmware' && !defined($vmid)) {
+ $data = $get_subdir_files->($storeid, $path, 'efi-firmware');
}
}
--
2.34.1
next prev parent reply other threads:[~2026-09-28 5:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 5:47 [PATCH v2 0/16] Support for custom EFI firmware Christian Ludwig
2026-09-28 5:47 ` Christian Ludwig [this message]
2026-09-28 5:47 ` [PATCH v2 pve-storage 2/16] test: get_subdir: cover the efi-firmware content type Christian Ludwig
2026-09-28 5:48 ` [PATCH v2 pve-storage 3/16] plugins: allow the efi-firmware content type on file based storages Christian Ludwig
2026-09-28 5:48 ` [PATCH v2 pve-storage 4/16] api: status: support efi-firmware in upload and download-url Christian Ludwig
2026-09-28 5:48 ` [PATCH v2 pve-storage 5/16] test: volume access: cover efi-firmware volumes Christian Ludwig
2026-09-28 5:48 ` [PATCH v2 pve-storage 6/16] test: list volumes: " Christian Ludwig
2026-09-28 5:48 ` [PATCH v2 qemu-server 07/16] config: add the efi-firmware option Christian Ludwig
2026-09-28 5:48 ` [PATCH v2 qemu-server 08/16] api: allow setting " Christian Ludwig
2026-09-28 5:48 ` [PATCH v2 qemu-server 09/16] ovmf: use a custom firmware image if configured Christian Ludwig
2026-09-28 5:48 ` [PATCH v2 qemu-server 10/16] test: efi-firmware key in VM config Christian Ludwig
2026-09-28 5:48 ` [PATCH v2 qemu-server 11/16] test: efi-firmware volumes replication Christian Ludwig
2026-09-28 5:48 ` [PATCH v2 pve-manager 12/16] ui: storage: add efi-firmware content type support Christian Ludwig
2026-09-28 5:48 ` [PATCH v2 pve-manager 13/16] ui: form: support other content types in the ISO selector Christian Ludwig
2026-09-28 5:48 ` [PATCH v2 pve-manager 14/16] ui: qemu: allow selecting a custom EFI firmware image Christian Ludwig
2026-09-28 5:48 ` [PATCH v2 pve-docs 15/16] pvesm: document the efi-firmware content type Christian Ludwig
2026-09-28 5:48 ` [PATCH v2 pve-docs 16/16] qm: document the efi-firmware VM option Christian Ludwig
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=dd9d178b076ddc8110b1e83141006eaaf34a62b2.1790337423.git@genua.de \
--to=christian_ludwig@genua.de \
--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