We have noticed that you rated an answer as not helpful. We appreciate your feedback and are committed to improving your experience with the Q&A. I have worked on finding an alternative solution to address your issue. Continuing on, I have a few things to share here.
Continuing on, I have a few things to share here-
If you are looking to attach the ALMA8 disk to an existing CentOS7 VM, it is possible. However, you need to remove that a plan is associated with the VM.
In contrast, non-Marketplace images do not require any plan information. If this information is inadvertently included in your VM configuration, it may result in errors when performing tasks such as attaching disks.
If the VM was originally created with incorrect settings or captured from an image that included plan details (even after being generalized), Azure will preserve these settings in the VM's metadata. This can lead to issues when attempting to perform actions that don't require plan information.
If you are looking to changing the OS from CentOS7 to ALMA8 during the initial VM creation process is not possible.
Microsoft does not support an upgrade of the operating system of a Microsoft Azure virtual machine. Instead, you should create a new Azure virtual machine that is running the supported version of the operating system that is required and then migrate the workload- https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/server-software-support
I have provided a detailed answer which has clear for which you are looking for. If you wish, you may re-surveying for the engagement you received on the thread. Your feedback is very important to us.