How to setup serial port in Virtual Box ?

This article provides step-by-step information to enable Virtualbox serial port. It is very common practice to use  Virtualbox for testing linux application in Windows OS based system. One will prefer to use the Virtualbox  serial port of  guest OS.

Setting Serial Port in Virtual Box

Mapping Windows 10  serial port to Virtual box can be done by enabling particular COM port as shown below

Note : Make sure no image is running in Virtual Box 

This process is shown in the GIF file below :

How to map COM Port  if assigned number is higher ?

Often you may notice COM port  number assigned by default higher than COM4 . In the following picture , Serial  port was assigned COM12

In such a case , You need to change it from Advanced option of Port Settings in Window’s device manager.  I changed this COM12 to COM2 which was not in use . Advance options can be as follows :

Following GIF is showing the other case:

 

If lower ports are also occupied by other inactive device drivers, Identify the useless driver and uninstall . Following GIF is showing inactive port

How to verify COM port in Linux running within Virtual Box ?

After that it was verified as shown in GIF file below.  You may notice change in COM2 icon color after device was connected .  This provides information up to final Minicom session.

You can check port using  dmesg |  grep tty*

Note : If you don’t see expected serial console. You may have to reboot the Windows system for releasing COM port if used earlier.

Finally , You should be able to see the console message depending on target connected

Thanks for reading till end. If you liked this, Please share in your network.

VirtualBox Folder sharing

Linux : busybox,dpkg,apt-get,apt

 

Git  Terminology Video

Latest Linux QUIZ 

You may like discussion on RISC-V .

Also subscribe  Embedkari for other interesting topics. .

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.