Quantcast
Channel: Azure Virtual Machines forum
Viewing all articles
Browse latest Browse all 12545

The blob is not a valid VHD

$
0
0

I'm trying to create a disk using the REST API.  The steps I'm following are as follows.

I'm creating a Page Blob using the storage API, and then trying to create a disk that references the created blob.

Here is a representation of the created blob:

#<Redacted> {

              :name => "e6f872ac44f2f33677343a4206e7fcdc.vhd",

              :size => 20,

    :container_name => "vhds",

               :url => "http://<redacted>.blob.core.windows.net/<redacted>/e6f872ac44f2f33677343a4206e7fcdc.vhd",

        :properties => {

                    "Last-Modified" => "Fri, 17 May 2013 16:06:47 GMT",

                             "Etag" => "0x8D0212FAAF30A99",

                   "Content-Length" => "21474836480",

                     "Content-Type" => "application/octet-stream",

                 "Content-Encoding" => "",

                 "Content-Language" => "",

                      "Content-MD5" => "",

                    "Cache-Control" => "",

        "x-ms-blob-sequence-number" => "0",

                         "BlobType" => "PageBlob",

                      "LeaseStatus" => "unlocked",

                       "LeaseState" => "available"

    }}

I'm then sending a request to create a Virtual Machine Disk that references that blob.  I'm sending the following request body:

<Disk xmlns=\"http://schemas.microsoft.com/windowsazure\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\"><OS>Linux</OS><Label>Some label</Label><MediaLink>http://<redacted>.blob.core.windows.net/<redacted>/e6f872ac44f2f33677343a4206e7fcdc.vhd</MediaLink><Name>98d7e98cf8f7f59edeb10162ce9ad64b</Name></Disk>

But I get this response back on the request:

<Error xmlns=\"http://schemas.microsoft.com/windowsazure\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\"><Code>BadRequest</Code><Message>The blob is not a valid VHD.</Message></Error>

Anybody have any ideas on why this fails?


Viewing all articles
Browse latest Browse all 12545

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>