mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-11-16 16:54:51 +02:00
Check if serial pipe can be opened for VMware and VirtualBox VMs.
This commit is contained in:
parent
f8ecd61a98
commit
341e2e2e3a
@ -938,7 +938,12 @@ class VirtualBoxVM(BaseNode):
|
||||
"""
|
||||
Starts remote console support for this VM.
|
||||
"""
|
||||
self._remote_pipe = yield from asyncio_open_serial(self._get_pipe_name())
|
||||
|
||||
pipe_name = self._get_pipe_name()
|
||||
try:
|
||||
self._remote_pipe = yield from asyncio_open_serial(pipe_name)
|
||||
except OSError as e:
|
||||
raise VirtualBoxError("Could not open serial pipe '{}': {}".format(pipe_name, e))
|
||||
server = AsyncioTelnetServer(reader=self._remote_pipe,
|
||||
writer=self._remote_pipe,
|
||||
binary=True,
|
||||
|
@ -845,7 +845,12 @@ class VMwareVM(BaseNode):
|
||||
"""
|
||||
Starts remote console support for this VM.
|
||||
"""
|
||||
self._remote_pipe = yield from asyncio_open_serial(self._get_pipe_name())
|
||||
|
||||
pipe_name = self._get_pipe_name()
|
||||
try:
|
||||
self._remote_pipe = yield from asyncio_open_serial(self._get_pipe_name())
|
||||
except OSError as e:
|
||||
raise VMwareError("Could not open serial pipe '{}': {}".format(pipe_name, e))
|
||||
server = AsyncioTelnetServer(reader=self._remote_pipe,
|
||||
writer=self._remote_pipe,
|
||||
binary=True,
|
||||
|
Loading…
Reference in New Issue
Block a user