Page 1 of 1
connecting two machines by serial port
Posted: 14. Oct 2009, 14:25
by sabcio
Hi, I want to connect two virtual machines (CentOS) through serial ports. How to configure those two machines to get them working? I'm using windows 7 as host for virtual box.
Re: connecting two machines by serial port
Posted: 15. Oct 2009, 15:42
by sabcio
No help?? I know how to connect them by ethernet but I need to do it by serial ports. No one every did it?
Re: connecting two machines by serial port
Posted: 15. Oct 2009, 16:42
by Perryg
Since both of your guests would need to connect to the hosts port to make this happen I don't see it working because they can not share the resource.
AFAIK serial ports are a one-to-one connect much like USB devices. Only one can access it at a time.
Re: connecting two machines by serial port
Posted: 16. Oct 2009, 10:21
by sabcio
it is possible because its done in a laboratory at my studies... but its done on Linux fedora and I have windows 7. Those are parts of XML configuration files from a computer that has 4 virtual centOS and that can be connected through serial ports
machine 1:
Code: Select all
<UART>
<Port slot="0" enabled="true" IOBase="0x3f8" IRQ="4" hostMode="HostDevice" path="/dev/ttyS3"/>
<Port slot="1" enabled="true" IOBase="0x2f8" IRQ="3" hostMode="HostPipe" path="/tmp/ttyASK12" server="true"/>
</UART>
machine 2:
Code: Select all
<UART>
<Port slot="0" enabled="true" IOBase="0x3f8" IRQ="4" hostMode="HostPipe" path="/tmp/ttyASK23" server="true"/>
<Port slot="1" enabled="true" IOBase="0x2f8" IRQ="3" hostMode="HostPipe" path="/tmp/ttyASK12"/>
</UART>
to connect them:
Code: Select all
[root@ask030100 ~]# pppd /dev/ttyS1 9600 192.168.100.1:192.168.100.2
and on the second virtual machine
Code: Select all
[root@ask030200 ~]# pppd /dev/ttyS1 passive 9600
and those two virtual machines communicate by serial ports.
Re: connecting two machines by serial port
Posted: 16. Oct 2009, 14:53
by Perryg
Ah virtual serial ports. Not the real serial ports. Easy enough for Linux but you need a helper for Windows.
It is in the manual though:
You can tell VirtualBox to connect the virtual serial port to a software pipe on the host. This depends on your host operating system:
On a Windows host, data will be sent and received through a named pipe. You can use a helper program called VMware Serial Line Gateway, available for download at
http://www.l4ka.org/tools/vmwaregateway.php . This tool provides a fixed server mode named pipe at \\.\pipe\vmwaredebug and connects incoming TCP connections on port 567 with the named pipe.
Re: connecting two machines by serial port
Posted: 18. Oct 2009, 17:25
by sabcio
Thanks for your help. I'll check it later. Hope it works.
Re: connecting two machines by serial port
Posted: 8. Nov 2009, 09:08
by re3bo0t
If it is not used helper by windows how?