mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-23 14:42:28 +00:00
Use console_host from the PortManager.
This commit is contained in:
parent
a6869379c3
commit
3472f19519
@ -58,7 +58,6 @@ class IOUVM(BaseVM):
|
||||
:param project: Project instance
|
||||
:param manager: parent VM Manager
|
||||
:param console: TCP console port
|
||||
:params console_host: TCP console host IP
|
||||
:params ethernet_adapters: Number of ethernet adapters
|
||||
:params serial_adapters: Number of serial adapters
|
||||
:params ram: Ram MB
|
||||
@ -69,7 +68,6 @@ class IOUVM(BaseVM):
|
||||
|
||||
def __init__(self, name, vm_id, project, manager,
|
||||
console=None,
|
||||
console_host="0.0.0.0",
|
||||
ram=None,
|
||||
nvram=None,
|
||||
ethernet_adapters=None,
|
||||
@ -86,7 +84,6 @@ class IOUVM(BaseVM):
|
||||
self._started = False
|
||||
self._path = None
|
||||
self._ioucon_thread = None
|
||||
self._console_host = console_host
|
||||
|
||||
# IOU settings
|
||||
self._ethernet_adapters = []
|
||||
@ -660,7 +657,7 @@ class IOUVM(BaseVM):
|
||||
"""
|
||||
|
||||
if not self._ioucon_thread:
|
||||
telnet_server = "{}:{}".format(self._console_host, self.console)
|
||||
telnet_server = "{}:{}".format(self._manager.port_manager.console_host, self.console)
|
||||
log.info("Starting ioucon for IOU instance {} to accept Telnet connections on {}".format(self._name, telnet_server))
|
||||
args = argparse.Namespace(appl_id=str(self.application_id), debug=False, escape='^^', telnet_limit=0, telnet_server=telnet_server)
|
||||
self._ioucon_thread_stop_event = threading.Event()
|
||||
|
@ -52,7 +52,6 @@ class QemuVM(BaseVM):
|
||||
:param host: host/address to bind for console and UDP connections
|
||||
:param qemu_id: QEMU VM instance ID
|
||||
:param console: TCP console port
|
||||
:param console_host: IP address to bind for console connections
|
||||
:param monitor: TCP monitor port
|
||||
:param monitor_host: IP address to bind for monitor connections
|
||||
"""
|
||||
@ -65,14 +64,12 @@ class QemuVM(BaseVM):
|
||||
qemu_path=None,
|
||||
host="127.0.0.1",
|
||||
console=None,
|
||||
console_host="0.0.0.0",
|
||||
monitor=None,
|
||||
monitor_host="0.0.0.0"):
|
||||
monitor_host="127.0.0.1"):
|
||||
|
||||
super().__init__(name, vm_id, project, manager, console=console)
|
||||
|
||||
self._host = host
|
||||
self._console_host = console_host
|
||||
self._command = []
|
||||
self._started = False
|
||||
self._process = None
|
||||
@ -81,7 +78,7 @@ class QemuVM(BaseVM):
|
||||
self._monitor_host = monitor_host
|
||||
|
||||
# QEMU settings
|
||||
self.qemu_path = qemu_path
|
||||
self._qemu_path = qemu_path
|
||||
self._hda_disk_image = ""
|
||||
self._hdb_disk_image = ""
|
||||
self._options = ""
|
||||
@ -824,7 +821,7 @@ class QemuVM(BaseVM):
|
||||
def _serial_options(self):
|
||||
|
||||
if self._console:
|
||||
return ["-serial", "telnet:{}:{},server,nowait".format(self._console_host, self._console)]
|
||||
return ["-serial", "telnet:{}:{},server,nowait".format(self._manager.port_manager.console_host, self._console)]
|
||||
else:
|
||||
return []
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user