They’re very short answer to this question is that you can’t use an ISO to build a new virtual machine inside of Azure. Azure will only accept VHD files; not even VHDx files that you might pull out of Hyper-V. This applies to both Windows and Linux operating systems, which can be quite frustrating if you have a customized .ISO you want to build the VM from.
To get around this there are six steps which basically get down to load the ISO into hyper V and customize the image as you see fit then convert the file .VHDx to VHD then upload it to Azure:
Prepare the source VM using an ISO image: Create a new, blank, fixed-size VHD in Hyper-V Manager. Use that VHD to create a new virtual machine. Mount your ISO image on the DVD drive of the new VM.
Start the VM and Install the Windows OS: Once the ISO is mounted, start the VM and proceed with the installation of the operating system.
Generalize the VHD using Sysprep if it is a Windows OS : After the OS installation, you need to generalize the VHD. This process removes system-specific data from the VHD, allowing you to use it as a template to create new VMs.
Copy the Generalized Image to Azure Blob Storage: Once the VHD is generalized, you need to upload it to Azure Blob storage. This is where Azure will access the VHD when creating new VMs.
This is a pain, but the Azure GUI does not allow VHD uploads so you have use command line: azcopy copy "path\to\your.vhd" "https://.blob.core.windows.net//"
In the Azure portal, navigate to your storage account, find the uploaded VHD, and create a managed disk from it.
Create a New Image: Add In the Azure Portal, select Images, click Add to create a new image.
Give the image a name. Note that is image is a template that will later be deployed to a virtual machine that you will specify a different name for later.
Ensure that the location is the same as the location of your storage account. In the OS disk section:
Select Windows or Linux OS type and if it is Windows, we highly recommend setting it a GEN2
Click Browse on the Storage Blob field. A new panel will list your storage accounts. Using this panel, navigate through the storage account and container to locate the Verify Governance VHD that was uploaded.
Click Create to begin the image creation process. This is a usually a fast process, only taking a few minutes to finish.
Create a New VM: Now you can use the usual CREATE A NEW VIRTUAL MACHINE process to select your custom image VHD