• 0
George

Connecting to serial port -> VirtualBox

Question

Hi all

 

In the following, now closed thread: 

references made of connecting to a serial port to see more output etc instead of just Kernal booting.

How is this done on Virtualbox. Been using ssh for year, but always onto ssh, can't remember when last I connected to a serial interface.

 

G

 

There is 

Share this post


Link to post
Share on other sites

11 answers to this question

Recommended Posts

  • 0

in vm config goto serial port, enable com1, modus host-pipe, uncheck connect with host/pipe and for path on windows have this "\\.\pipe\ds3615" (ds3615 is just a string you choose for each vm differently as you can have more then one vm using this)

in putty you select serial instead of the usual ssh or telnet, where the ip/host is (now named "serial line") comes the pipe you defined in the vm "\\.\pipe\ds3615" and speed is 115200, after starting the vm the pipe is available and you can connect with putty

 

Share this post


Link to post
Share on other sites
  • 0
On 3/3/2018 at 12:56 PM, IG-88 said:

in vm config goto serial port, enable com1, modus host-pipe, uncheck connect with host/pipe and for path on windows have this "\\.\pipe\ds3615" (ds3615 is just a string you choose for each vm differently as you can have more then one vm using this)

in putty you select serial instead of the usual ssh or telnet, where the ip/host is (now named "serial line") comes the pipe you defined in the vm "\\.\pipe\ds3615" and speed is 115200, after starting the vm the pipe is available and you can connect with putty

 

 

Not to figure out how to do the putty component on a MAC using the terminal program

 

G

Share this post


Link to post
Share on other sites
  • 0

as mac os is derived from bsd i'd expect it to be like unix/linux

 

https://www.virtualbox.org/manual/ch03.html#serialports

"...

On a Mac, Linux or Solaris host, a local domain socket is used instead. The socket filename must be chosen such that the user running VirtualBox has sufficient privileges to create and write to it. The /tmp directory is often a good candidate.

..."

Share this post


Link to post
Share on other sites
  • 0
8 hours ago, IG-88 said:

as mac os is derived from bsd i'd expect it to be like unix/linux

 

https://www.virtualbox.org/manual/ch03.html#serialports

"...

On a Mac, Linux or Solaris host, a local domain socket is used instead. The socket filename must be chosen such that the user running VirtualBox has sufficient privileges to create and write to it. The /tmp directory is often a good candidate.

..."

thanks

 

Curious, is this same serial port access available/configurable on a bare metal XPenology install, (note to self go look if it is available via quikcnicks boot loader).

 

G

Share this post


Link to post
Share on other sites
  • 0

Not sure what you mean but if you have DSM installed baremetal and your MOBO has a serial port/header then yes you can access serial boot logs from there. You would need another computer and a serial-to-usb cable to see those logs.

Share this post


Link to post
Share on other sites
  • 0

ok, so I edited my VM configure to point to /tmp/ds3615

After restarting the VM I can see the file having been created via Terminal on my MAC.

 

Now what, figure I should be able to simply tail -f the file, but getting permission error/not allowed,

 

G

Share this post


Link to post
Share on other sites
  • 0

Go to your VM settings > Ports. There enable serial port and in Port Mode select Raw File. Then in the Path/Address box put the path to the file you want the logs to be dumped to. Done. Boot your machine and boot logs will be dumped in that file.

Share this post


Link to post
Share on other sites
  • 0

:) ok, that looks better, I can see the startup happen, and can interface with it.

 

Actually expected allot more to come to the screen, comparing to a previous thread and included screen grabs attached.

 

it ends with a login prompt, although it did not accept my admin username/password.

 

G

Share this post


Link to post
Share on other sites
  • 0
Posted (edited)

my posting was about host-pipe not file

"

...

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 Mac, Linux or Solaris host, a local domain socket is used instead. The socket filename must be chosen such that the user running VirtualBox has sufficient privileges to create and write to it. The /tmp directory is often a good candidate.

..."

 

 

image.png.7c7838cf452cf7edf0989b103df5a671.png

Edited by IG-88

Share this post


Link to post
Share on other sites
  • 0

Yes I know it was about host-pipe but since he was unable to make it work (at least it required more steps to view logs) I gave him an alternative.

In any case the question has been answered.

Share this post


Link to post
Share on other sites
  • 0
The question(s) in this topic have been answered and/or the topic author has resolved their issue. This topic is now closed. If you have other questions, please open a new topic.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.