I've migrated a .vhd blob, based on a Linux virtual machine from Azure subscription "A" to Azure subscription "B".

I used this article as a guide: Migrate Azure Virtual Machine Between Storage Accounts I had difficulty finding all the information I needed, so for the benefit of people with similar needs, Storage > Manage Access Keys was the section of the Azure portal with necessary information; this was not explained in the article.

When I get to the step of creating an Image from the .vhd file on the subscription B, I'm prompted to check a box to indicate that I have run "waagent -deprovision" on the Virtual Machine.

enter image description here

I haven't actually run this command on the original virtual machine on subscription A. Having read some information about this, it appears to be intended for when a virtual machine is used as the basis of a template for new virtual machines. I only want to migrate this virtual machine to the new subscription, I don't actually want to use this image as a template for many machines.

The only important unique information on the server are API keys for other services. There are SSH keys stored, but this is intended to replace the original virtual machine, so it is desirable for these to be preserved.

Is it safe for me to falsely confirm that I have run "waagent -deprovision", in order to create an image, or is there a risk?


You do not have to create an Image to do this. You need to copy the VHD to the new storage account and then create a "Disk" not an "Image" from it. Then you can use this Disk from the copied VHD blob to attach to your new VM as the OSDisk.

An image allows you to create a template to deploy new VMs from and as you mention above, this is not what you want.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.