mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-04 06:21:15 +02:00
Require Dynamips 0.2.23 and bind Dynamips hypervisor on 127.0.0.1
This commit is contained in:
1 parent
04ba3b6549
commit
771a9a5ddb
3 files changed
+21
-9
No files matched your search
@@ -24,6 +24,7 @@ import os
|
||||
import subprocess
|
||||
import asyncio
|
||||
|
||||
from gns3server.utils import parse_version
|
||||
from gns3server.utils.asyncio import wait_for_process_termination
|
||||
from .dynamips_hypervisor import DynamipsHypervisor
|
||||
from .dynamips_error import DynamipsError
|
||||
@@ -204,11 +205,9 @@ class Hypervisor(DynamipsHypervisor):
|
||||
command = [self._path]
|
||||
command.extend(["-N1"]) # use instance IDs for filenames
|
||||
command.extend(["-l", "dynamips_i{}_log.txt".format(self._id)]) # log file
|
||||
# Dynamips cannot listen for hypervisor commands and for console connections on
|
||||
# 2 different IP addresses.
|
||||
# See https://github.com/GNS3/dynamips/issues/62
|
||||
if self._console_host != "0.0.0.0" and self._console_host != "::":
|
||||
command.extend(["-H", "{}:{}".format(self._host, self._port)])
|
||||
if parse_version(self.version) >= parse_version('0.2.23'):
|
||||
command.extend(["-H", "{}:{}".format(self._host, self._port), "--console-binding-addr", self._console_host])
|
||||
else:
|
||||
command.extend(["-H", str(self._port)])
|
||||
|
||||
return command
|
||||
Reference in new issue
Block a user