diff --git a/gns3server/compute/virtualbox/virtualbox_vm.py b/gns3server/compute/virtualbox/virtualbox_vm.py index caefb0c9..a3611458 100644 --- a/gns3server/compute/virtualbox/virtualbox_vm.py +++ b/gns3server/compute/virtualbox/virtualbox_vm.py @@ -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, diff --git a/gns3server/compute/vmware/vmware_vm.py b/gns3server/compute/vmware/vmware_vm.py index 15fac4f5..64a26e50 100644 --- a/gns3server/compute/vmware/vmware_vm.py +++ b/gns3server/compute/vmware/vmware_vm.py @@ -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,