Page 1 of 1

Mapping client serial port to guest

Posted: 24. Nov 2012, 14:02
by Kjeld
Hi, I am new to VIrtualbox and I am running a Win7 VM/guest on a Win7 host. First of all I hope I am using the terminology for 'guest', 'host' and 'client' correctly.
What I am trying to achieve is to configure my VM to map one of its virtual serial ports to the physical serial port of a WinXP client.
Reading the documentation I am starting to understand mappings are possible between VM/guest and the host the VM is running on, but what I want is the VM/guest to be able to use the client's serial port (if any) as if it was its own.
And the same question goes for mapping a USB port.
Is this possible in any way?

Cheers,
Kjeld

Re: Mapping client serial port to guest

Posted: 24. Nov 2012, 14:50
by mpack
There is no client. There's your computer (the host), and the VMs it caters for (the guests). I assume when you use the word client you mean the host. There is no client/server like relationship: think of them as two separate PCs, which aren't even on the same network unless you configure one.

To configure a serial port, see the VM settings | Serial Ports... dialog. It should be quite straightforward to map a host physical port to a guests simulated port. Leave everything as defaults except set the "Enable Serial Port" checkbox, make sure "Port Mode" is "Host Device" and set the host device name in the "Port/File Path:" field to whatever your host serial port is called.

Do not change the "Port Number", IRQ, and "I/O Port" settings. Leave them on COM1 etc, and you'll find that the guest has a COM1 (regardless of how the port is numbered on the host).

Re: Mapping client serial port to guest

Posted: 24. Nov 2012, 15:19
by Kjeld
Thank you for your reply.
Thanks for clearing up 'guest' and 'host'.
What I mean by 'client': there will be a device, for example a computer, which at some point is used to access the guest, either by RDP, VNC, file sharing or any other way.
This device is what I meant by 'client'.

So the question remains: is it possible to map this 'client' physical serial port to a virtual port on the guest/VM.

Thanks!

Re: Mapping client serial port to guest

Posted: 24. Nov 2012, 20:15
by mpack
The only serial connection available to the guest (network tricks aside) is the one on the host. Basically the guest borrows the hosts serial port, and via that is able to talk to a remote PC in the usual way.

If this still isn't what you mean then by all means try another way of explaining it.

Re: Mapping client serial port to guest

Posted: 24. Nov 2012, 21:07
by Kjeld
I'll try. :)
I have a host machine at home, Win7 Ultimate, at which VirtualBox is running.
I have configured one VM, which is also Win7 Ultimate. It is running in the same local network as the host.
I would like to use this VM, the guest, solely to run a cash register program.
Elsewhere I have a small company with an old and quite slow XP desktop computer, which I'd like to use as a thin client, accessing my cash register VM remotely using a remote desktop utility like RDP, VNC or probably Teamviewer.
The desktop computer has an actual cash register and receipt printer both connected to COM1. What I am trying to accomplish is to have this hardware installed on the VM, as if it were actually connected to the VM's COM1, so my cash register program can control them.

While explaining this, I realize this might not be a VirtualBox configuration, but maybe a remote desktop configuration.

Re: Mapping client serial port to guest

Posted: 24. Nov 2012, 21:42
by Kjeld
Update: I think I can solve this problem focusing on the remote connection, not so much by VM configuration.
Windows RDP has an option to map local ports to the remote machine. I can't actually test it right now, but when enabling this, the VM/guest should show the client's serial ports, as if they actually exist on the VM. I'll try tomorrow.

Thanks for your patience and time.

Re: Mapping client serial port to guest

Posted: 25. Nov 2012, 10:05
by jorgensen
Kjeld wrote:I would like to use this VM, the guest, solely to run a cash register program.
I would use a socalled serial server that is box having serial input and Ethernet output examples, and use the dedicated driver on the guest.

Otherwise you can find a guide for configuring the serial port here: viewtopic.php?f=2&t=26860

Re: Mapping client serial port to guest

Posted: 3. Dec 2012, 14:42
by Kjeld
jorgensen wrote:I would use a socalled serial server that is box having serial input and Ethernet output examples, and use the dedicated driver on the guest.
There also seem to be several software solutions for this. Next to using Windows Remote Desktop Protocol, which supports serial port 'mapping', and using this over a secure VPN tunnel like I am currently trying to do, there seem to be projects such as http://com0com.sourceforge.net/ and http://www.virtualserialport.com/produc ... -ethernet/