I had a customer the other week who had a Hyper-V environment and wanted to move to Azure, however they had Windows Server 2012 (non R2) which Azure Site Recovery doesn’t support. They had to start the procedures to move VMs manually to Azure.
So I made up a JSON template which they can use to help move their VM workloads to Azure. All they need to do is to start the beginning phases on-prem themselves to prepare the disks. They need to convert their VHDX disks to VHD using Convert-VHD.
Convert-VHD –Path c:\test\MY-VM.vhdx –DestinationPath c:\test\MY-NEW-VM.vhd -VHDType Fixed
Follow the steps to prepare the disk to copy to Azure – https://docs.microsoft.com/en-us/azure/virtual-machines/windows/prepare-for-upload-vhd-image – please note, the image doesn’t really need to be generalised.
Then upload the VHD disk to a blob storage account in the same region and subscription as to where they want to create the Azure VM. Pick an existing storage account or create a new storage account, then create a storage container to copy the VHD to, and give the container public read access and copy the URI for the actual VHD disk itself, use the free Azure Storage Explorer, to do all of this as this is the easiest storage tool to use. The URI copied to the clipboard will need to be fed into the JSON template below as a parameter value when run.
When run, the JSON template below will allow the customer to specify the VHD blob storage URI for the VHD file in their blob storage account and choose an existing vNet for which to deploy the VM to. The VHD disk specified would then be converted to a managed disk automatically and then a new VM would be provisioned from this new managed disk.