1

I'm trying to move a VM custom image from one DevTest Lab to another and can't seem to find an easy way to accomplish that. My VM is using managed disks and also has a data disk.

I've read the following article https://azure.microsoft.com/en-us/updates/azure-devtest-labs-changes-in-exporting-custom-image-vhd-files/ and it states that

Azure DevTest Lab now generates a managed image and "…This allows Sysprep'ed/deprovisioned custom images to support data disks in addition to the OS disk through a single image."

This is fine but the image that is created can't be exported.

Is it even possible to accomplish, am I missing something?

Thanks for your help

Wayne Yang
  • 9,016
  • 2
  • 20
  • 40
PatLac
  • 25
  • 3

1 Answers1

3

This is fine but the image that is created can't be exported.

The article you posted is right, you can follow it to export the VM OS disk(not image) to your local machine. You should export the VM OS disk from the Resource group which contains your Devtest VM. The main steps are below:

  1. Generate your VM

  2. Go to Azure Portal > find the resource group which name contains your DevtestLab VM : enter image description here

  3. Then, you can find the Disk and export it to your local machine: enter image description here

  4. Go to your another Devtest Lab > Configuration and plocies > Custom images > Add > Enter your VHD location and choose the OS type > OK > the coustom image will be uploaded Then you can use it to create your Devtest VM. enter image description here

Wayne Yang
  • 9,016
  • 2
  • 20
  • 40
  • Thanks, this works fine for a VM that has only an OS Disk, will there be a way to export an image that has datadisks in one simple operation instead of exporting each disks separately? Recreating the custom image in the other DevTest Lab requires multiple steps : 1) create image from VHD 2) create a VM from image 3) Attach datadisks to VM 4) create the new image that has the datadisk. – PatLac Jan 25 '18 at 11:49
  • Hi @PatLac, About the Data disk in Dev test Lab: You cannot create the image with data disks.The custom image is for OS base. If you want to use the data disk in another Dev test Lab, I think you'd better copy the data from the data disk to the new data disk in another Dev Test Lab. So, there is no way to use a data disk in another Dev test Lab directly. – Wayne Yang Jan 26 '18 at 05:09
  • @PatLac . Additional, you can also upvote for this idea in [this User Voice Page](https://feedback.azure.com/forums/320373-devtest-labs/suggestions/14842470-deploy-a-os-template-with-attached-data-discs), Azure DevTest Labs Team has planned to started it. – Wayne Yang Jan 26 '18 at 05:13
  • @wayne-yang-msft , Thanks for the details, I will work on this. – PatLac Jan 27 '18 at 14:48