1.5

Table Of Contents
Request:
GET https://vcloud.example.com/transfer/..../disk0.vmdk
Response:
200 OK
...
...serialized contents of file disk0.vmdk...
EOF
NOTE The downloaded package is valid only if the descriptor and all of its referenced files maintain the same
relationship in the local file system that they had on the transfer server file system. In this case, the descriptor
and disk0.vmdk were both in the same directory, which is the default arrangement.
Upload a Media Image
The vCloud API supports uploading virtual media such as CD-ROM and floppy disk images.
The workflow for uploading media images is similar to the one described in “Upload an OVF Package to Create
a vApp Template,” on page 55.
NOTE You cannot download media images.
Prerequisites
Verify that the following conditions are met:
n
You have a media image to upload.
n
You are logged in as a user who has permission to upload media images.
n
You know the URL of the target vDC that will receive the upload. Retrieve the XML representation of
your organization to see a list of the vDCs that it contains.
Procedure
1 Find the media link in the target vDC.
Retrieve the XML representation of the vDC contains a media link, which has the following form:
<Link
rel="add"
type="application/vnd.vmware.vcloud.media+xml"
href="https://vcloud.example.com/api/vdc/5/media" />
2 POST a media request to the server.
The request body is a Media element that includes information about the virtual media item to upload. See
the request portion of “Example: Upload a Media Image,” on page 68.
The server uses this information to create a Media object, then returns a representation of the object that
contains an upload URL. See the response portion of “Example: Upload a Media Image,” on page 68.
3 PUT the media file contents to the upload:default link in the response.
The procedure is the same as the one shown in “Uploading Referenced Files,” on page 61.
Chapter 4 Provisioning an Organization with vApps, Templates, and Media
VMware, Inc. 67