5.1

Table Of Contents
When a virtual machine is deployed in a vDC that supports fast provisioning, its disks can become part of a
tree structure that includes parent and child disks. Disk tree structure and total storage consumption remain
the same regardless of the order in which virtual machines are relocated The folder structure in the target
datastore might change depending on the order in which virtual machines are relocated.
Prerequisites
Verify that you are logged in to the vCloud API as a system administrator.
Procedure
1 List the datastores available in the cloud.
Use a request like this one.
GET https://vcloud.example.com/api/admin/extension/datastores
The response is a DatastoreReferences element, as shown here:.
<vmext:DatastoreReferences
xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
type="application/vnd.vmware.admin.datastoreList+xml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://vcloud.example.com/api/v1.5/schema/master.xsd">
<vcloud:Link
rel="up"
type="application/vnd.vmware.admin.vmwExtension+xml"
href="https://vcloud.example.com/api/admin/extension" />
<vcloud:Reference
type="application/vnd.vmware.admin.datastore+xml"
name="example-lun2"
href="https://vcloud.example.com/api/admin/extension/datastore/607" />
<vcloud:Reference
type="application/vnd.vmware.admin.datastore+xml"
name="example-lun4"
href="https://vcloud.example.com/api/admin/extension/datastore/191" />
</vmext:DatastoreReferences>
2 Retrieve the representation of the virtual machine.
The following request retrieves a Vm from a Vapp:
GET https://vcloud.example.com/api/vApp/vm-257
3 Find the action/relocate link for the Vm, and note the datastore that the Vm currently occupies.
This fragment of the response to the request made in Step 2 includes the action/relocate link and the
reference to the datastore that the Vm currently occupies.
<Vm
xmlns="http://www.vmware.com/vcloud/v1.5"
... >
<VCloudExtension
required="false">
...
<vmext:VimObjectRef>
<vmext:VimServerRef
type="application/vnd.vmware.admin.vmwvirtualcenter+xml"
name="VC1"
href="https://vcloud.example.com/api/admin/extension/vimServer/35" />
vCloud API Programming Guide
232 VMware, Inc.