LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (http://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   access virtual box serial port from host (http://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/access-virtual-box-serial-port-from-host-800191/)

wykthorr 04-05-2010 03:26 PM

access virtual box serial port from host
 
Hi everybody,

Here's the setup and what I want to achieve:

I have a ubuntu host system and a windows xp virtual box virtual machine running.
What I want is a way to communicate to the vm's serial port from the host linux system much like if the virtual machine was connected to the physical machine's serial port through a cable.

I've searched the internet quite a lot, but I'm kinda confused right now so if anybody could give me a nice solution that would be great.

Cheers,
Victor

ganiutomo 04-05-2010 09:10 PM

Theoretically you can use tunneling, but I don't know how.

But ff what you want is networking from host to guest, you already have it. You don't need serial port to do that.

mweed 04-05-2010 11:42 PM

I have not tested this and don't have the time to do so right now, but try:

Code:

VBoxManage modifyvm <vm name or uuid> --uart1 0x3F8 4
VBoxManage modifyvm <vm name or uuid> --uartmode1 /dev/ttyS0

see VBoxManage list vms for name and uuid.

That should set COM1 to irq 4 port base 3F8 (1016 dec) and tie it into ttyS0 of the physical host.

Let us know the results.

-- Edit --

Misread your original post.. My above comments will not allow access from the host OS to the virtual machines serial port. just the physical serial port to the guest OS.

try "server" instead of specifying a device

Code:

VBoxManage modifyvm <vm> --uartmode1 server /tmp/foo
That will create a UNIX domain socket file. you can communicate with is using nc -U or by installing socat or using any application that connects to UNIX domain sockets. You will no be able to redirect stdin or out directly to the socket.


All times are GMT -5. The time now is 07:55 AM.