Add-AzureDisk fails with 'has an unsupported size' - blob is divisible by 1024 but the disk is 512 bytes less


  • My disk was converted to a fixed disk
    Convert-Vhd “e:\vms\t-disk1.vhd” e:\vms\fixeddisk1.vhd –Type Fixed
    There is a problem with the conversion -see below.  There is some help in the link below but delinking the requirement of an exact number of meg for an azure disk file would be good -
    PS C:\> Add-AzureVhd -LocalFilePath 'c:\crud\vmdk\topa\fixed2.vhd' -Destination " http://xxx.blo"
     MD5 hash is being calculated for
    MD5 hash calculation is completed.
    Elapsed time for the operation: 00:10:25
    Creating new page blob of size 53686403072...
    Detecting the empty data blocks in the local file.
    Detecting the empty data blocks completed.
    Elapsed time for upload: 03:25:34
    LocalFilePath                                               DestinationUri
    -------------                                               --------------
    PS C:\> Add-AzureDisk -DiskName 'T-Disk1' -MediaLocation "
     fixeddisk1.vhd" -OS Windows
     Add-AzureDisk : HTTP Status Code: BadRequest - HTTP Error Message: The VHD has an unsupported virtual size of 53686402560 bytes.  The size must be a whole number
      (in MBs).
     Operation ID: f48a3bb1abc94e7bb10461dad486fae9
     At line:1 char:14
     + Add-AzureDisk <<<<  -DiskName 'T-Disk1' -MediaLocation "
     /fixeddisk1.vhd" -OS Windows
         + CategoryInfo          : CloseError: (:) [Add-AzureDisk], CommunicationException
         + FullyQualifiedErrorId : Microsoft.WindowsAzure.Management.ServiceManagement.IaaS.AddAzureDiskCommand

    • Edited by DavidB111 Tuesday, February 5, 2013 9:50 AM
    Thursday, January 31, 2013 4:00 PM