Serial console for Azure-hosted FreePBX VM?

I recently followed this guide to spin up a FreePBX 16 VM in Azure. I started with a local Hyper-V setup, followed the steps, then proceeded with setting up the Azure side and transferring it over. In other words, I was able to follow the guide from start to finish without much fuss.

One thing I’m noticing is that I’m unable to get the Azure Serial Console view to work with this VM. Piecing together different online posts led me to focus on a specific GRUB setting - “GRUB_CMDLINE_LINUX”.

Most resources suggested this entry:

rootdelay=300 console=ttyS0 console=tty0 earlyprintk=ttyS0

The Azure Github suggests this:

console=ttyS0,115200 earlyprintk=ttyS0,115200 rootdelay=300

The FreePBX on Azure guide I was following had me do the former (with the extra line for ‘net.ifnames=0’), and just last night I tried the latter (leaving ‘net.ifnames=0’ at the end). Both don’t seem to work, and the serial console is still black with the enter key doing nothing.

Might anyone have some insight into what else I can check, or if I’m on the right track but there’s something amiss with the above lines? Does anyone have a working Azure-hosted FreePBX with the serial console working? Thanks in advance!

Here’s my GRUB command line for an Azure VM with a working serial console.

[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-3.10.0-1127.19.1.el7.x86_64 root=UUID=779956cb-a89d-49d4-ac28-8ff77b1d47e4 ro crashkernel=auto spectre_v2=retpoline selinux=0 console=ttyS0,115200 earlyprintk=ttyS0 rootdelay=300 LANG=en_US.UTF-8

Hi billsimon,

Thanks so much for the reply; I just had a good window to try this tonight after hours. I took what you wrote and did my best to fit it into the proper spots, but I’m still seeing the same blinking cursor with no further text or console of any sort.

While watching the console view, the only thing I can see is a line during the boot for “The selected entry will be started automatically in Xs” (X being a countdown). After that, nothing aside from a blinking cursor that does not seem to respond to any input. Funny enough, I see a screenshot of the login prompt when I click into “Boot diagnostics” section.

Any chance you (or anyone, please!) can take a look and see if I have the config right?

Here’s /etc/default/grub:

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="gfxterm"
GRUB_CMDLINE_LINUX="crashkernel=auto spectre_v2=retpoline selinux=0 console=ttyS0,115200 earlyprintk=ttyS0 rootdelay=300 LANG=en_US.UTF-8"
GRUB_DISABLE_RECOVERY="true"
GRUB_BACKGROUND=/boot/splash.png

And here’s what I believe to be the relevant section of /boot/grub2/grub.cfg (which I did not edit directly, I used the command “grub2-mkconfig”)

...
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Sangoma Linux (3.10.0-1127.19.1.el7.x86_64) 7 (Core)' --class sangoma --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-1127.19.1.el7.x86_64-advanced-754d8f18-50f2-4fa0-834b-c1ccf33053d1' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod xfs
        set root='hd0,gpt2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  54f87a17-c8fd-4ba1-afb4-b30e7f1d8f97
        else
          search --no-floppy --fs-uuid --set=root 54f87a17-c8fd-4ba1-afb4-b30e7f1d8f97
        fi
        linuxefi /vmlinuz-3.10.0-1127.19.1.el7.x86_64 root=UUID=754d8f18-50f2-4fa0-834b-c1ccf33053d1 ro crashkernel=auto spectre_v2=retpoline selinux=0 console=ttyS0,115200 earlyprintk=ttyS0 rootdelay=300 LANG=en_US.UTF-8
        initrdefi /initramfs-3.10.0-1127.19.1.el7.x86_64.img
}
if [ "x$default" = 'Sangoma Linux (3.10.0-1127.19.1.el7.x86_64) 7 (Core)' ]; then default='Advanced options for Sangoma Linux>Sangoma Linux (3.10.0-1127.19.1.el7.x86_64) 7 (Core)'; fi;
### END /etc/grub.d/10_linux ###
...

Appreciate any help or insight!

/etc/default/grub:

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL="serial console"
GRUB_SERIAL_COMMAND="serial --speed=115200"
GRUB_CMDLINE_LINUX="crashkernel=auto spectre_v2=retpoline selinux=0 console=ttyS0,115200"
GRUB_DISABLE_RECOVERY="true"

menuentry in grub.cfg:

menuentry 'Sangoma Linux (3.10.0-1127.19.1.el7.x86_64) 7 (Core)' --class sangoma --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-957.21.3.el7.x86_64-advanced-779956cb-a89d-49d4-ac28-8ff77b1d47e4' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd0,gpt1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 --hint='hd0,gpt1'  779956cb-a89d-49d4-ac28-8ff77b1d47e4
        else
          search --no-floppy --fs-uuid --set=root 779956cb-a89d-49d4-ac28-8ff77b1d47e4
        fi
        linux16 /boot/vmlinuz-3.10.0-1127.19.1.el7.x86_64 root=UUID=779956cb-a89d-49d4-ac28-8ff77b1d47e4 ro crashkernel=auto spectre_v2=retpoline selinux=0 console=ttyS0,115200 earlyprintk=ttyS0 rootdelay=300 LANG=en_US.UTF-8
        initrd16 /boot/initramfs-3.10.0-1127.19.1.el7.x86_64.img
}

Hope those help you. I don’t remember having to hack at this, but I installed it using the serial console initially so that just carried over to the finished install.