Serial Console is not accessible from VMs created from a custom AlmaLinux 9.3 image

I’m currently following the “RHEL 8+ using Hyper-V Manager” section in Microsoft Azure’s documentation link to create RedHat Azure images. I’ve successfully created a modified AlmaLinux 9.2 image from a Hyper-V VM, adjusting the GRUB menu as follows:

GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_CMDLINE_LINUX="crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M loglevel=3 console=tty1 console=ttyS0,115200n8 earlyprintk=ttyS0,115200 earlyprintk=ttyS0 net.ifnames=0"
GRUB_TIMEOUT_STYLE=countdown
GRUB_TERMINAL="serial console"
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true

The AlmaLinux 9.2 image works perfectly, allowing me to create new Azure VMs without issue. However, I’m encountering difficulties when attempting to create an AlmaLinux 9.3 image from a Hyper-V VM. Specifically, the serial console remains blank after deploying a Azure VM from the custom AlmaLinux 9.3 image.

Interestingly, VMs created initially from an AlmaLinux 9.2 image and subsequently updated to AlmaLinux 9.3 maintain serial console accessibility. The problem seems specific to creating an Azure image directly from an AlmaLinux 9.3 Hyper-V VM.

Normally, I would create an AlmaLinux 9.2 Azure VM from the image and then upgrade it. However, I need to migrate some AlmaLinux 9.3 servers to the cloud. Has anyone else encountered issues creating AlmaLinux 9.3 images from AlmaLinux 9.3 Hyper-V VMs, or does anyone have insights into why creating Azure images from these VMs presents this challenge?

It’s unusual that setting the serial console in the file /etc/default/grub on AlmaLinux 9.2 and running sudo grub2-mkconfig -o /boot/efi/EFI/almalinux/grub.cfg worked.

While for AlmaLinux 9.3, I resolved the issue by running sudo grubby --update-kernel=ALL --args="console=tty0 console=ttyS0,115200". I hope this helps anyone encountering a similar issue.