Ubuntu 14.04 Azure Serial Console Not Working

Recently I was tasked with migrating an ageing Ubuntu 14.04 server up to Azure with the chosen method being ASR (Azure Site Recovery).

I was led to use ASR due to failed Azure migrate attempts with lots of undesirable results. One undesirable result that was consistent with both methods however was the serial console connection failing to take user input.

The behavior we were experiencing was odd, the serial console output was correct however it would not take any input at all, leaving it pretty useless and not ideal for scenarios where we cant get SSH access and need the console as our only way in.

After hours of myself and a colleague tearing our hair out rebuilding GRUB configs and editing files we finally opened a Microsoft ticket and got the solution, its surprisingly easy.

It all comes down to one file – /etc/init/ttyS0.conf 

In our case that file did not exist so we created it with the following contents…

############################################

 

# ttyS0 - getty

#

# This service maintains a getty on ttyS0 from the point the system is

# started until it is shut down again.

start on stopped rc RUNLEVEL=[12345]

stop on runlevel [!12345]

 

respawn

exec /sbin/getty -L 115200 ttyS0 vt102

 

############################################

Finally running sudo start ttyS0 started the ttyS0 connection and restored our serial console to perfect working order!

Easy when you know how!