Fix issues after merging

This commit is contained in:
grossmj 2026-07-21 17:20:46 +02:00
parent 0091f2c64a
commit 1f6e00d29f
No known key found for this signature in database
GPG Key ID: 1E7DD6DBB53FF3D7
3 changed files with 5 additions and 3 deletions

View File

@ -35,7 +35,7 @@ import shlex
import psutil
from pathlib import Path
from gns3server.utils import parse_version, shlex_quote
from gns3server.utils import parse_version
from gns3server.utils.asyncio import subprocess_check_output, cancellable_wait_run_in_executor
from .qemu_error import QemuError
from .utils.qcow2 import Qcow2, Qcow2Error
@ -2293,8 +2293,7 @@ class QemuVM(BaseNode):
options.extend(["-bios", self._bios_image.replace(",", ",,")])
elif self._uefi:
ovmf_firmware_dir = self._manager.config.get_section_config("Qemu").get("ovmf_firmware_dir", "/usr/share/OVMF")
system_ovmf_firmware_dir = Path(ovmf_firmware_dir)
system_ovmf_firmware_dir = Path(self.manager.config.settings.Qemu.ovmf_firware_dir)
log.info("Using OVMF firmware directory: {}".format(system_ovmf_firmware_dir))
old_ovmf_vars_path = os.path.join(self.working_dir, "OVMF_VARS.fd")
if os.path.exists(old_ovmf_vars_path):

View File

@ -177,6 +177,8 @@ enable_hardware_acceleration = True
require_hardware_acceleration = False
; Allow unsafe additional command line options
allow_unsafe_options = False
; Path to the OVMF firmware directory
ovmf_firmware_dir = "/usr/share/OVMF"
[WebWireshark]
; Enable Web Wireshark feature (container-based Wireshark in browser)

View File

@ -71,6 +71,7 @@ class QemuSettings(BaseModel):
enable_hardware_acceleration: bool = True
require_hardware_acceleration: bool = False
allow_unsafe_options: bool = False
ovmf_firmware_dir: str = "/usr/share/OVMF"
model_config = ConfigDict(validate_assignment=True, str_strip_whitespace=True)