An Azure service that is used to provision Windows and Linux virtual machines.
Hello @BaeSam ,
Thanks for reaching out to Microsoft QnA.
We don't have the documentation for doing the above usng CLI, but we have it for PowerShell. Can you please refer to the PowerShell documentation and convert it to CLI as per your own requirements.
Here is the document link - Devtest-lab-create-custom-image-from-vhd-using-powershell.
Also, you can create the image out of a Azure lab VM using the Azure Portal.
Now, when you create new lab VMs using the same image, the Python Program will come by default in all those newly created VMs form the same custom image. Post that, you can use your lab VM (by logging into the VM) and run the Python program from within the VM after installing the MSI for Azure CLI from here.
Hope this helps. Looking forward to your response. Could you please tag me in your response for me to able to get a notification.
Also, if I have misunderstood your ask by any chance, kindly revert back. Thank you.
----------------
Please accept as answer and upvote if the information provided above is helpful.