Enable the serial console for custom Linux VM image on Azure

To enable the serial console for your custom Linux VM image, enable console access in the file /etc/inittab to run a terminal on ttyS0.

For example: S0:12345:respawn:/sbin/agetty -L 115200 console vt102.

You may also need to spawn a getty on ttyS0 and this can be done with systemctl start serial-getty@ttyS0.service.