Introduction

During this setup, we will how we could connect Serial console of Guest CentOS6 over Oracle VirtualBox from the windows7 machine via PuTTY.

Setup

We have setup below infra for this post

Host                   -- Windows7
Guest                  -- CentOS6
Virtulization platform -- Oracle VirtualBox
Conneting App          -- PuTTY

For connecting Serial console of CentOS6, we need to change or add some parameters in Linux machine.

First of all, we need to add console parameters in grub.conf file.

ttyS1=115200,8n1 console=ttyS1

Above serial console parameters in grub.conf. Here I added ttyS1 not ttyS0 because in my windows machine COM1 (that used to connect ttyS0) was already occupied. I am using speed 115200 that we need to use while connecting through PuTTY.

We also need to add ttyS1 in /etc/securetty file. After adding all this n Linux machine we just need to reboot Linux machine.

We also need to edit VM setting in Oracle VirtualBox, virtual machine platform like below

 

 

 

 

 

 

 

 

 

 

Here sometimes one question raises, why we used ttyS0 in Linux and COM2 in windows. Actually, mapping of Linux serial console with Windows COM ports is bit different.
ttyS0 — COM1
ttyS1 — COM2
ttyS2 — COM3
ttyS3 — SOM4

So Above mapping of Linux serial port towards Windows COM ports is the main reason for this confusion.

Further, we just need to start connecting Linux machine through PuTTY application. Open PuTTY.

Click on Connection type : Serial
Serial line              : \\.\pipe\COM2
Speed                    : 115200

Click on open. Need to click twice will provide login console.like below
serial_port_PuTTY