You can update a Vm to revalidate the storage profile it uses or specify a different storage profile. Revalidation of a virtual machine's current storage profile is required whenever the datastore that supports the virtual machine changes.
Every Vm element includes a StorageProfile element whose href attribute value specifies the default storage profile consumed by the virtual machine. This default is used for all hard diskItems in the VIrtualHardwareSection that do not specify storageProfileOverrideVmDefault.
If you do not specify a StorageProfile during an instantiate, compose, or recompose operation, it is inherited from the organization VDC in which the virtual machine is deployed. To change the value of an existing StorageProfile, you must update the entire Vm element that contains it.
Prerequisites
This operation requires the rights included in the predefined vApp Author role or an equivalent set of rights.Verify that you are logged in to the vCloud Air Compute Service as an End User.
Procedure
Example: Update the Storage Profile for a Virtual Machine
This example shows a Vm element containing a StorageProfile. The actual update operation requires the entire Vm element, including the StorageProfile, in the request body. Only a small part of the element appears in this example.
PUT https://vcloud.example.com/api/vApp/vm-4 Content-type: application/vnd.vmware.vcloud.vm+xml ... <?xml version="1.0" encoding="UTF-8"?> <Vm ...> ... <StorageProfile type="application/vnd.vmware.vcloud.vdcStorageProfile+xml" name="Gold" href="https://vcloud.example.com/api/vdcStorageProfile/3" /> </Vm>
202 Accepted Content-Type: application/vnd.vmware.vcloud.task+xml ... <Task ... operation="Updating Virtual Application Linux FTP server (7)" ...> ... </Task>