How to import a standard VM into a devtest lab

1k views Asked by At

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

There are 1 answers

3
Sa Yang On BEST ANSWER

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