Migrate VM to Managed Disks Fails

Bruno 21 Reputation points
2020-07-22T18:55:34.207+00:00

Hi,

Successfully migrated exiting production VM and Data storage from classic to ARM. Now, when attempting to migrate disks from unmanaged to managed I get this error: Failed to migrate the virtual machine 'VM'. Error: VHD footer 'Current Size' field validation failed. VHD for disk 'VM_os_dsk.vhd' with blob https://blah.blob.core.windows.net:8443/vhds/os_dsk.vhd specifies size (37762367488) which does not match VHD blob size (37763416576) - VHD Footer Size (512). The VM is currently working fine.

I've tried downloading the vhd using Azure Storage Explorer multiple times, but it fails right before it completes because a size mismatch issue. Even turning off the MD5 check option... I get the same problem.

After trying multiple times I was able to download the VHD using a SAS url, however now when I use resize-vhd, I'm getting error message that the VHD is corrupt and unreadable, even though the VM in azure is running perfectly fine. I've tried downloading the VHD a couple of times, still the same error.

What am I doing wrong, can someone help? How can I migrate this VM to managed disks?

Thanks for your help.

Azure Migrate
Azure Migrate
A central hub of Azure cloud migration services and tools to discover, assess, and migrate workloads to the cloud.
Azure Disk Storage
Azure Disk Storage
A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Anonymous
    2020-07-23T17:33:06.603+00:00

    @Bruno-8416 It appears you will need to resize the VHD in order for this to work properly. You can try using VHD Resizer to accomplish this. Please note I recommend to not run this on the production system.

    https://blogs.msdn.microsoft.com/devkeydet/2012/07/05/resizing-an-azure-vm-vhd-file/

    Hopefully this helps!


    Please don’t forget to "Accept the answer" wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2020-07-22T21:36:31.537+00:00

    @Bruno This document walks through identifying and mitigating this issue. Please try the mitigation steps and see if it fixes your issue.

    https://learn.microsoft.com/en-us/azure/virtual-machines/windows/migration-classic-resource-manager-errors#vm-with-data-disk-whose-physical-blob-size-bytes-does-not-match-the-vm-data-disk-logical-size-bytes

    --------------

    Please don’t forget to "Accept the answer" wherever the information provided helps you, this can be beneficial to other community members.


  2. Bruno 21 Reputation points
    2020-07-24T23:14:06.88+00:00

    Thank you! I was able to successfully resize the vhd and create managed disks from it.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.