Hi,
I want to create template from vApp and also as parameter include vdc compute policy. Main goal is separate win OS on selected hosts.
Successfully created template via API without "CaptureVmParams" elements, but when I add these parameters call fails with 500 error code.
VM link I think is correct because I can browse VM parameters using this link also VDC policy is in place. What I'm missing?
POST https://1.1.1.1/api/catalog/f4382924-bf6c-44f0-9c0a-7263e5bab8db/action/captureVApp
<?xml version="1.0" encoding="UTF-8"?>
<CaptureVAppParams
xmlns="http://www.vmware.com/vcloud/v1.5"
name="Example Corp’s CRM Appliance">
<Description>Captured CRM Appliance</Description>
<Source
href="https://1.1.1.1/api/vApp/vapp-bcb173ad-3c43-4f38-8d4d-29c294ea3a21" />
<CaptureVmParams>
<Source href="https://1.1.1.1/api/vApp/vm-e0b95812-88e1-4bf7-81f4-da630335ebc4" />
<VdcComputePolicy
name="WIN" />
</CaptureVmParams>
</CaptureVAppParams>
Thanks!
Experimenting I found solution when include compute policy ID then I can capture vApp to template.
After that when deploying VM from template it have correct compute policy and host-affinity rules will place VM's
on specified ESXi hosts.
Something like this:
<CaptureVmParams>
<Source href=" " />
<VdcComputePolicy
href=" "
id=" "
name=" " />
</CaptureVmParams>
Experimenting I found solution when include compute policy ID then I can capture vApp to template.
After that when deploying VM from template it have correct compute policy and host-affinity rules will place VM's
on specified ESXi hosts.
Something like this:
<CaptureVmParams>
<Source href=" " />
<VdcComputePolicy
href=" "
id=" "
name=" " />
</CaptureVmParams>