Using the rest API to deploy a vApp, we would like at deployment time to change the storage profile of ONE of the VMs in the deployment (ie not use the default for one VM). How to do this? I do not see a section in the instantiateparams for storage.
Thank you
Figured it out.
"SourcedVmInstantiationParams" is the tag that needs to be added for each VM that you would like the profile changed on. This has to be at the SAME level as "SOURCE"
ie:
<?xml version="1.0" encoding="UTF-8"?>
<InstantiateVAppTemplateParams
xmlns="http://www.vmware.com/vcloud/v1.5"
name="test"
deploy="false"
powerOn="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1">
<Description>Testing</Description>
<InstantiationParams>
<LeaseSettingsSection type="application/vnd.vmware.vcloud.leaseSettingsSection+xml">
<ovf:Info>Lease Settings</ovf:Info>
<StorageLeaseInSeconds>172800</StorageLeaseInSeconds>
<StorageLeaseExpiration>2017-11-11T08:08:16.438-07:00</StorageLeaseExpiration>
</LeaseSettingsSection>
</InstantiationParams>
<Source href="https://something/api/vAppTemplate/vappTemplate-1234967d-cbfd-4d6a-b9ac-41a9b7075062" />
<SourcedVmInstantiationParams>
<Source href="https://something/api/vAppTemplate/vm-12345015-e960-1195-96ae-8b8ad50b7ba0" name="serverb01" />
<StorageProfile href="https://something/api/vdcStorageProfile/12345cfd-37a2-424d-acd6-d3624463e542" name="Temp Deployment"/>
</SourcedVmInstantiationParams>
<AllEULAsAccepted>true</AllEULAsAccepted>
</InstantiateVAppTemplateParams>
Figured it out.
"SourcedVmInstantiationParams" is the tag that needs to be added for each VM that you would like the profile changed on. This has to be at the SAME level as "SOURCE"
ie:
<?xml version="1.0" encoding="UTF-8"?>
<InstantiateVAppTemplateParams
xmlns="http://www.vmware.com/vcloud/v1.5"
name="test"
deploy="false"
powerOn="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1">
<Description>Testing</Description>
<InstantiationParams>
<LeaseSettingsSection type="application/vnd.vmware.vcloud.leaseSettingsSection+xml">
<ovf:Info>Lease Settings</ovf:Info>
<StorageLeaseInSeconds>172800</StorageLeaseInSeconds>
<StorageLeaseExpiration>2017-11-11T08:08:16.438-07:00</StorageLeaseExpiration>
</LeaseSettingsSection>
</InstantiationParams>
<Source href="https://something/api/vAppTemplate/vappTemplate-1234967d-cbfd-4d6a-b9ac-41a9b7075062" />
<SourcedVmInstantiationParams>
<Source href="https://something/api/vAppTemplate/vm-12345015-e960-1195-96ae-8b8ad50b7ba0" name="serverb01" />
<StorageProfile href="https://something/api/vdcStorageProfile/12345cfd-37a2-424d-acd6-d3624463e542" name="Temp Deployment"/>
</SourcedVmInstantiationParams>
<AllEULAsAccepted>true</AllEULAsAccepted>
</InstantiateVAppTemplateParams>
Thanks for sharing the solution. It will be very helpful when scripting the VM deployment tasks