Launching a VM using a marketplace image in Azure is pretty straight forward.
here is the relevant piece of code.
def create_vm(network_client, compute_client):
vm_parameters = {
'storage_profile': {
'image_reference': {
'publisher': 'MicrosoftWindowsServer',
'offer': 'WindowsServer',
'sku': '2012-R2-Datacenter',
'version': 'latest'
}
},
vm = compute_client.virtual_machines.create_or_update(
GROUP_NAME,
VM_NAME,
vm_parameters
)
(Clearly there is more in the actual code, this is the part that I think is most relevant)
So in this case the image reference points to the marketplace.
I used the following doc to create a custom image.
I would like to create a VM based on the new custom image that I created. It is my perception that image_reference should point to something else but it isn't clear to me what it should be. Can anybody help here?
Thanks!