mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-13 20:08:55 +00:00
Keep Dynamips logs.
This commit is contained in:
parent
e6fd471dd5
commit
dc4df68c7a
@ -160,8 +160,6 @@ class Dynamips(BaseManager):
|
||||
files += glob.glob(os.path.join(project_dir, "ilt_*"))
|
||||
files += glob.glob(os.path.join(project_dir, "c[0-9][0-9][0-9][0-9]_*_rommon_vars"))
|
||||
files += glob.glob(os.path.join(project_dir, "c[0-9][0-9][0-9][0-9]_*_ssa"))
|
||||
files += glob.glob(os.path.join(project_dir, "dynamips_log*"))
|
||||
files += glob.glob(os.path.join(project_dir, "*_log.txt"))
|
||||
for file in files:
|
||||
try:
|
||||
log.debug("Deleting file {}".format(file))
|
||||
|
@ -42,7 +42,7 @@ class Hypervisor(DynamipsHypervisor):
|
||||
:param host: host/address for this hypervisor
|
||||
"""
|
||||
|
||||
_instance_count = 0
|
||||
_instance_count = 1
|
||||
|
||||
def __init__(self, path, working_dir, host, port):
|
||||
|
||||
@ -181,7 +181,7 @@ class Hypervisor(DynamipsHypervisor):
|
||||
|
||||
command = [self._path]
|
||||
command.extend(["-N1"]) # use instance IDs for filenames
|
||||
command.extend(["-l", "dynamips_log_{}.txt".format(self._port)]) # log file
|
||||
command.extend(["-l", "dynamips_i{}_log.txt".format(self._id)]) # log file
|
||||
if self._host != "0.0.0.0" and self._host != "::":
|
||||
command.extend(["-H", "{}:{}".format(self._host, self._port)])
|
||||
else:
|
||||
|
@ -1494,7 +1494,8 @@ class Router(BaseVM):
|
||||
"""
|
||||
|
||||
try:
|
||||
reply = yield from self._hypervisor.send("vm extract_config {}".format(self._name))[0].rsplit(' ', 2)[-2:]
|
||||
reply = yield from self._hypervisor.send("vm extract_config {}".format(self._name))
|
||||
reply = reply[0].rsplit(' ', 2)[-2:]
|
||||
except IOError:
|
||||
#for some reason Dynamips gets frozen when it does not find the magic number in the NVRAM file.
|
||||
return None, None
|
||||
|
Loading…
Reference in New Issue
Block a user