title: How can I get the URL of a captured VM Image stored in Azure Resource Manager?
body: <p>I am trying to create a new VM in Azure RM based on the sysprepped capture of an existing VM installation. That is:</p>
  
  <pre><code>$urlOfCapturedImage = &lt;I cannot find this&gt;
  
  ...
  
  $vm = Set-AzureRmVMOSDisk -VM $vm -Name $osDiskName -VhdUri $newOsDiskUri `
          -CreateOption fromImage -SourceImageUri $urlOfCapturedImage -Windows
  
  New-AzureRmVM -ResourceGroupName $resourceGroupName -Location $location -VM $vm
  </code></pre>
  
  <p>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 <strong>Images</strong> category, with the following, limited information:</p>
  
  <p><a href="https://i.stack.imgur.com/NTlWa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NTlWa.png" alt="enter image description here"></a></p>
  
  <p>I have tried using the following URL/URIs, but none of them work:</p>
  
  <pre><code>https://&lt;storage-account-name&gt;.blob.core.windows.net/system/Microsoft.Compute/Images/jira-7-sysprep-20170724133831.vhd
  
  /subscriptions/&lt;subscription-id&gt;/resourceGroups/&lt;resource-group&gt;/providers/Microsoft.Compute/images/jira-7-sysprep-20170724133831
  </code></pre>
  
  <p>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?</p>