Create a Linux OS Image
Create an image of the Linux virtual machine configured per your site's requirements.
To create an OS image requires the Azure CLI. Refer to these instructions for installing the CLI How to install the Azure CLI. It is recommended to install the CLI on a Windows or Mac machine and then use the command prompt to execute the CLI commands.
Before you can create an OS image of the previously created VM, you must first SSH into the VM and deprovision it. Next you will use the Azure CLI to deallocate and generalize the VM and then create the image. Generalizing the virtual machine removes any SSH keys and DNS settings from the VM.
az account list az account set --subscription yourSubscriptionID