fix(qemu): fix addition of QEMU RNG device causes interface names to change

This commit is contained in:
grossmj 2026-07-29 17:23:28 +02:00
parent c75e1ba0be
commit e2657febf0
No known key found for this signature in database
GPG Key ID: 1E7DD6DBB53FF3D7

View File

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