[pve-devel] [PATCH qemu-server 04/31] cfg2cmd: ovmf: support print_ovmf_commandline() returning machine flags
Fiona Ebner
f.ebner at proxmox.com
Wed Jun 25 17:56:27 CEST 2025
This is in preparation for the switch to -blockdev, where it will be
necessary to specify the 'pflash0' and 'pflash1' machine flags.
Suggested-by: Alexandre Derumier <alexandre.derumier at groupe-cyllene.com>
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
No changes since previous version.
src/PVE/QemuServer.pm | 3 ++-
src/PVE/QemuServer/OVMF.pm | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/PVE/QemuServer.pm b/src/PVE/QemuServer.pm
index bb10f116..513652d6 100644
--- a/src/PVE/QemuServer.pm
+++ b/src/PVE/QemuServer.pm
@@ -3582,10 +3582,11 @@ sub config_to_command {
arch => $arch,
q35 => $q35,
};
- my $ovmf_cmd = PVE::QemuServer::OVMF::print_ovmf_commandline(
+ my ($ovmf_cmd, $ovmf_machine_flags) = PVE::QemuServer::OVMF::print_ovmf_commandline(
$conf, $storecfg, $vmid, $hw_info, $version_guard,
);
push $cmd->@*, $ovmf_cmd->@*;
+ push $machineFlags->@*, $ovmf_machine_flags->@*;
}
if ($q35) { # tell QEMU to load q35 config early
diff --git a/src/PVE/QemuServer/OVMF.pm b/src/PVE/QemuServer/OVMF.pm
index ae2f6fab..dde81eb7 100644
--- a/src/PVE/QemuServer/OVMF.pm
+++ b/src/PVE/QemuServer/OVMF.pm
@@ -202,6 +202,7 @@ sub print_ovmf_commandline {
my $amd_sev_type = $hw_info->{'amd-sev-type'};
my $cmd = [];
+ my $machine_flags = [];
if ($amd_sev_type && $amd_sev_type eq 'snp') {
if (defined($conf->{efidisk0})) {
@@ -215,7 +216,7 @@ sub print_ovmf_commandline {
push $cmd->@*, '-drive', $var_drive_str;
}
- return $cmd;
+ return ($cmd, $machine_flags);
}
1;
--
2.47.2
More information about the pve-devel
mailing list