2

I have created and configured a VM in Azure. I would like to use the image created from that VM in a devtest lab. However, I see that images in devtest labs can only be created from VHD disk.

Is it possible to transform a normal Azure image into a VHD disk? If yes, how exactly?

1 Answers1

5

As I known, It is not possible to transform an Azure image into a VHD disk directly.

If I understand what you want properly ,you just want to import your VM into your devtest Lab.

If your Original VM is unmanaged, you can move your VM vhd from the storage account to the "uploads" Container in your Devtest Lab storage account with powershell.

More about Moving VHDs from one Storage Account to Another, refer to this Blog.

If your Original VM is managed, you should export your VM Disk to a VHD, and then download it to your local machine, then upload the VHD to the Devtest Lab create Image whith these powershell scripts:

Add-AzureRmVhd -Destination "<Enter your DevTest Lab upload VHD location>" -LocalFilePath "<Enter VHD location here>"

Also, these powershell script can generated from here:

enter image description here

Wayne Yang
  • 9,016
  • 2
  • 20
  • 40
  • If I well undestand "managed" VMs is the new format, "classic" is an old one. In case this is correct, this means that VMs in the new format are more difficult to use in a devtest lab because I have to download and upload really huge files. To download and upload 200GB takes almost 2 days! – nicolamarangoni Sep 14 '17 at 09:01
  • HI,@nicolamarangoni, in ARM portal, you can check your VM Disk is whether managed. Azure ARM supports both managed and Unmanaged disk .When you created your VM, you can choose a disk type.More about difference between Manged Disk and manged disk refer to this:https://learn.microsoft.com/en-us/azure/virtual-machines/windows/about-disks-and-vhds#types-of-disks – Wayne Yang Sep 14 '17 at 09:11
  • @nicolamarangoni With Unmanged Disk ,you can check and use your disk VHD in your storage account, but you cannot see you disk VHD with managed disk. Becasue managed disk is managed by azure. – Wayne Yang Sep 14 '17 at 09:13