Merge pull request #2839 from GNS3/bugfix/2838

Fix addition of QEMU RNG device in 2.2.60 causes interface names to change
This commit is contained in:
Jeremy Grossmann 2026-07-29 18:00:16 +02:00 committed by GitHub
commit 3f19ede8d2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2480,7 +2480,6 @@ class QemuVM(BaseNode):
elif sys.platform.startswith("win") or sys.platform.startswith("darwin"): elif sys.platform.startswith("win") or sys.platform.startswith("darwin"):
command.extend(["-enable-hax"]) command.extend(["-enable-hax"])
command.extend(["-boot", "order={}".format(self._boot_priority)]) command.extend(["-boot", "order={}".format(self._boot_priority)])
command.extend(self._bios_option())
command.extend(self._cdrom_option()) command.extend(self._cdrom_option())
command.extend((await self._disk_options())) command.extend((await self._disk_options()))
command.extend(self._linux_boot_options()) command.extend(self._linux_boot_options())
@ -2498,6 +2497,8 @@ class QemuVM(BaseNode):
raise QemuError("Console type {} is unknown".format(self._console_type)) raise QemuError("Console type {} is unknown".format(self._console_type))
command.extend(self._monitor_options()) command.extend(self._monitor_options())
command.extend((await self._network_options())) command.extend((await self._network_options()))
# bios options must be last to have predictable NIC numbering, see https://github.com/GNS3/gns3-server/issues/2838
command.extend(self._bios_option())
if self.on_close != "save_vm_state": if self.on_close != "save_vm_state":
await self._clear_save_vm_stated() await self._clear_save_vm_stated()
else: else: