On AWS, the CLI command to see console messages that let you know what problems the VM is having an issue at boot time is:
aws ec2 get-console-output --instance-id
Is there any similar command in Azure?
Thank you!
Yes, Azure provides a similar way to view the boot diagnostics logs of a VM that is not booting up. You can use Azure CLI -
to get the boot diagnostic logs
az vm boot-diagnostics get-boot-log --resource-group <ResourceGroupName> --name <VMName>
but before that you need to enable boot diagnostics
az vm boot-diagnostics enable --resource-group <ResourceGroupName> --name <VMName> --storage <StorageAccountName>
Reference link for CLI- az vm boot-diagnostics | Microsoft Learn