From e763980dbea0fd45237b8f9d05e458f1843ac3c6 Mon Sep 17 00:00:00 2001 From: grossmj Date: Sat, 18 May 2019 13:51:00 +0700 Subject: [PATCH] Add %console-port% variable for additional Qemu options. Fixes https://github.com/GNS3/gns3-gui/issues/2786 --- gns3server/compute/qemu/qemu_vm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gns3server/compute/qemu/qemu_vm.py b/gns3server/compute/qemu/qemu_vm.py index b1c76009..b612fa63 100644 --- a/gns3server/compute/qemu/qemu_vm.py +++ b/gns3server/compute/qemu/qemu_vm.py @@ -1889,6 +1889,8 @@ class QemuVM(BaseNode): additional_options = additional_options.replace("%vm-id%", self._id) additional_options = additional_options.replace("%project-id%", self.project.id) additional_options = additional_options.replace("%project-path%", '"' + self.project.path.replace('"', '\\"') + '"') + if self._console: + additional_options = additional_options.replace("%console-port%", self._console) command = [self.qemu_path] command.extend(["-name", self._name]) command.extend(["-m", "{}M".format(self._ram)])