VirtualBox

12 年 前 建立

7 年 前 結束

#11011 closed enhancement (worksforme)

Allow guest serial port to redirect to a pseudo terminal on UNIX hosts

回報者: ziyan 負責人:
元件: uart 版本: VirtualBox 4.2.0
關鍵字: PTY 副本:
Guest type: all Host type: all

描述

Currently you can redirect a guest's serial port only to a domain socket or a hardware port (TTY). Connecting to a domain socket requires additional tools like "socat" to transform the vbox domain socket to either a PTY or TCP port.

It would be nice to be able to redirect a guest's serial port *directly* to a pseudo terminal slave device on UNIX hosts. Basically I would like to do something like:

VBoxManage--uartmode1 /dev/ttyp1
screen /dev/ptyp1 && VBoxManage startvm linux

On v 4.1. this fails with Failed to open host device /dev/ttyp1 VERR_RESOURCE_BUSY

A forum thread describing this issue: https://forums.virtualbox.org/viewtopic.php?f=2&p=101962

I hope adding this is not too difficult since you already support TTYs. Thanks.

附加檔案 (1)

VBoxScreen (942 位元組 ) - 7 年 前, 由 Valery Ushakov 新增
Quick proof of concept script to start vbox with serial port connected to a new screen window

下載所有附檔: .zip

更動歷史 (3)

comment:1 9 年 前aeichner 編輯

This works here on an OS X host. The only problem is that I received a warning because pseudo terminals don't support TIOCMGET. This will be fixed in the next maintenance release where we just skip querying the status lines for pseudo terminals.

Can you confirm that this works for you with a recent VirtualBox release leaving the above mentioned warning aside?

comment:2 7 年 前Valery Ushakov 編輯

狀態: newclosed
處理結果: worksforme

It failed most likely b/c the master side was not open. And since ~everyone has switched to the cloning sysv ptys that approach won't work there either as the ptys don't even exist until you clone yourself a master/slave pair. What you can do instead is use a script that you'd run under screen that will use the pty after the screen has created new window.

7 年 前Valery Ushakov 編輯

附檔: 新增 VBoxScreen

Quick proof of concept script to start vbox with serial port connected to a new screen window

注意: 瀏覽 TracTickets 來幫助您使用待辦事項功能

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette