serial port VirtualBox on Linux host(tested on ubuntu )
来源:互联网 发布:sql存储过程详细说明 编辑:程序博客网 时间:2024/05/21 08:01
While installing Solaris on VirtualBox on Linux host, I was slightly annoyed by the graphical interface. I had to go out of my screen session, use mouse, click the virtual machine window, let it steal the input and then press right ctrl key to go out, and use mouse again to go back to my screen session.
Solaris x86 supports installation over a serial port. Why not use it?
VirtualBox supports attaching a serial device to a guest machine. By default, serial ports are disabled. If you go to the details tab, and see ‘Serial Ports’, you can click it and get a dialog box. Enable serial port COM1 (IRQ 4 I/O port 0x3F8). There are two port modes. One of them is ‘Host Device’. It would be very nice to use it, but VirtualBox run as a normal user lacks permissions to create devices. The other option is ‘Host Pipe’. Normal user permssions are sufficient to create a pipe, but when you run VirtualBox and examine the file type, you’ll find out that what has been actually created is a unix domain socket rather than a pipe.
How do you access serial port exposed as a socket? Use socat!
I’ve worked out two ways of accessing the serial port: by converting to TCP and by converting to a pty (pseudo teletype device). First, TCP solution. Let’s say, that the path to the socket is “/tmp/foo-socket”. We’ll use socat to convert it to a TCP server.
socat UNIX-CONNECT:/tmp/foo-socket TCP-LISTEN:8040
This command shouldn’t return to prompt. If it does, your serial port device on the guest virtual machine isn’t ready yet. If it doesn’t return, go to a different terminal window and type:
telnet localhost 8040
Voila! Another solution is to create a pty.
socat UNIX-CONNECT:/tmp/foo-socket PTY,link=/tmp/foo-pty
…and on another terminal:
screen /tmp/foo-pty
If socat returns immediately, it means your guest system doesn’t use the serial port at the moment. If you’re installing Solaris 10, you’ll have to select a serial port (ttya) installation mode first, in the bootloader.
- serial port VirtualBox on Linux host(tested on ubuntu )
- Virtual Serial Port on Ubuntu
- virtualbox on archlinux host
- virtualbox on archlinux host
- xen on virtualbox, host ubuntu 10.04, guest centos 5.6
- JAVA: Serial Port access with javax.comm or rxtx on Windows, Linux etc.
- Communication on a serial port in NET 2.0
- How to terminate console on serial port (UART)
- ssh: connect to host IPADDR port 22: Connection timed out on ubuntu
- Install VirtualBox on Ubuntu 12.10
- How to kill a process on a port on ubuntu
- Linux Port Forward Setting on Fedora15
- 在Ubuntu上编译VirtualBox(Building VirtualBox On Ubuntu)
- Ubuntu 虚拟串口 Serial port
- Rails3 on Ubuntu 以及虚拟机Virtualbox 安装
- Installing VirtualBox Guest Additions on ubuntu 11.04
- autosize function of ubuntu on virtualbox
- connect android-x86 on virtualbox ubuntu
- 直接通过ODBC读写Excel表格文件 译者:徐景周(原作:Alexander Mikula)
- div背景填充
- MYSQL 字符集-乱码
- rhel没有my.cnf
- mingdmanager 7
- serial port VirtualBox on Linux host(tested on ubuntu )
- Spring 回顾<一>
- malloc、kmalloc和vmalloc的区别
- Java Runtime.exec()注意事项
- VC 将程序最小化到托盘
- &如何区分是引用还是取地址
- Android Handler的用法
- hashtable
- SAP 批次管理(Batch management)