Add %console-port% variable for additional Qemu options. Fixes https://github.com/GNS3/gns3-gui/issues/2786

This commit is contained in:
grossmj 2019-05-18 13:51:00 +07:00
parent f1ae3b3778
commit e763980dbe

View File

@ -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)])