I am trying to create a new VM in Azure RM based on the sysprepped capture of an existing VM installation. That is:
$urlOfCapturedImage = <I cannot find this>
...
$vm = Set-AzureRmVMOSDisk -VM $vm -Name $osDiskName -VhdUri $newOsDiskUri `
-CreateOption fromImage -SourceImageUri $urlOfCapturedImage -Windows
New-AzureRmVM -ResourceGroupName $resourceGroupName -Location $location -VM $vm
My current problem is finding the correct URL for the stored VM image, since it doesn't appear to be stored as a VHD blob in my storage account. Instead, I find it in the Images category, with the following, limited information:
I have tried using the following URL/URIs, but none of them work:
https://<storage-account-name>.blob.core.windows.net/system/Microsoft.Compute/Images/jira-7-sysprep-20170724133831.vhd
/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.Compute/images/jira-7-sysprep-20170724133831
Does anyone know how to get the proper URL for my VM image? Or could it simply be that I am using the wrong method altogether?