locked
csupload produces unknown error ("unsupported virtual size") RRS feed

  • Question

  • Hi,

    Using a trial account I tried to upload a Linux vhd file (approx. 10 GB) to a container (vhds) that I assume is being created on the fly (?):

    "C:\Program Files\Microsoft SDKs\Windows Azure\.NET SDK\2012-06\bin>csupload Add-PersistentVMImage -Destination "https://coutinho.blob.core.windows.net/vhds/test.vhd" -LiteralPath C:\Users\kvandenberg\Documents\test.vhd -Label Test -OS Linux"

    The upload seems to complete ok, but then:

    "Registering the image 'test.vhd' with repository.
    The VHD https://coutinho.blob.core.windows.net/vhds/test.vhd has an unsupported virtual size of 10191437824 bytes.  The size must be a whole number (in MBs)."

    What's the problem? I didn't find mention of  this error anywhere.

    Tuesday, July 24, 2012 6:43 AM

Answers

  • according to the error message your VHD image is 9719.3125MB, where Azure expects a whole number size (so at least 9720MB in your case). And we're re talking size if the virtual disk, not the plain file size of the uploaded vhd.

    Not sure how you created the image, but you should use some tool to resize the virtual disk, e.g. using Hyper-V tools and set the size to 10GB or so before uploading the image again.

    • Marked as answer by Arwind - MSFT Monday, July 30, 2012 9:05 AM
    Tuesday, July 24, 2012 9:46 AM

All replies

  • according to the error message your VHD image is 9719.3125MB, where Azure expects a whole number size (so at least 9720MB in your case). And we're re talking size if the virtual disk, not the plain file size of the uploaded vhd.

    Not sure how you created the image, but you should use some tool to resize the virtual disk, e.g. using Hyper-V tools and set the size to 10GB or so before uploading the image again.

    • Marked as answer by Arwind - MSFT Monday, July 30, 2012 9:05 AM
    Tuesday, July 24, 2012 9:46 AM
  • Thanks for your answer, which suggests a very straightforward solution :). I'm not running Hyper-V and used the freeware StarWind Converter to perform a vmdk-to-vhd conversion. This tool doesn't allow to set the file size of the vhd, so I found and used vmToolkit's Vhd Resizer to resize the vhd to 9720 MB.

    Just started to upload. Had to use the -Overwrite option, since csupload reports the presence of the image that failed to register.

    Tuesday, July 24, 2012 12:52 PM
  • I am getting the same error when I try to create a 'disk' out of the vhd.

    "The VHD https://xxxx.blob.core.windows.net/vhds/testhost.vhd has an unsupported virtual size of 44032000000 bytes.  The size must be a whole number (in MBs)."

    How is this not a whole number in MBs?

    Joshua


    Monday, June 23, 2014 11:12 PM
  • I have exactly the same problem. Did anyone find a solution? Did you? 

    - Claus

    Wednesday, September 10, 2014 2:19 PM
  • Using the above example I attempted to use Resize-VHD -PATH .\$filename -SizeBytes 5.1GB but that failed with the following error.

    {

        "status""Failed",

        "error": {

            "code""InvalidParameter",

            "target""disks",

            "message""The VHD for disk '$file.vhd' with blob https://mydisks.blob.core.net:8443/$container/$file.vhd has an unsupported virtual size of 5222.400390625 MB. The size must be a whole number in (MBs)."

        }

    }

    I found that this formula will work.

    1MB = 1048576

    5223 = Next rounded up size in MB of the existing disk.

    5223 * 1048576 = 5476712448

    Resize-VHD -PATH '.\$file.vhd' -SizeBytes 5476712448

    Wednesday, February 24, 2021 8:39 AM
    Administrator