Remap Com1/2 to a TCP socket ....

Discussion in 'Feature Suggestions' started by brettw, Apr 9, 2006.

  1. brettw

    brettw Member

    Messages:
    94
    Currently in the OS X version it has a method to map the VM's emulated com 1 and 2 to a UNIX socket ... but I think (with an eye on running this in a data center environment) you should remap it to either a plain TCP port listener that I can telnet to or an SSH connectable tunnel. This would be extremely useful to eliminate console access problems and make remote management of Linux / UNIX VMs possible. I wouldn't use this on OS X as much as I would on a Win/Linux server hosting guest Linux / Solaris VMs.
     
  2. petro

    petro Member

    Messages:
    35
    Connect to Socket

    How can you connect to the unix socket? Is there a simple solution to treating the unix socket like a terminal, so I could use something like zterm or minicom to communicate with it?
     
  3. brettw

    brettw Member

    Messages:
    94
    In short - no, not that I know of. A UNIX socket is like a named pipe / FIFO buffer local to the host. I suppose if you wanted to you could come up with someting in perl using the IO::Socket::UNIX module but I'd rather have an INET socket I could simply use a terminal like zterm telnet etc etc hence my request to have it connectable via TCP/IP ....
     
  4. mlandel

    mlandel Member

    Messages:
    27
    The "pipe" is apparently a named stream. If you search for "SerialClient" in the forum, you will find someone that has been able to attach to this stream to create real serial connections via Keyspan USB-to-Serial adpaters.

    I have attemped to create two VM's that used the same "pipe" to talk to each other via hyperterminal, one VM as server and the other as client. The link from server to client worked but the return from client to server did not. Not sure why not and I haven't had a chance to get back to this. It may be that both VM's using server or client might work or it might be a bug. I might better understand it after I get deeper into the SerialClient code.
     
  5. sdfjkl

    sdfjkl Bit poster

    Messages:
    9
    Very simple actually:

    telnet /tmp/serial

    From the telnet(1) manpage:

    host Indicates the official name, an alias, or the Internet address of
    a remote host. If host starts with a `/', telnet establishes a
    connection to the corresponding named socket.
     
  6. stevesteffler

    stevesteffler Bit poster

    Messages:
    3
    modem?

    thanks sdfjkl. Have you any idea how to connect the input and output from the /tmp/socket file to a modem port in Mac OS X, i.e. a /dev/cu.usbmodem or /dev/tty.usbmodem connection? I have been looking into using the unix 'cu' command to do this but have had little luck so far.

    Steve
     

Share This Page