Hello Everyone,
I'm running into an issue while restoring a VM back to vCloud. I must delete the old VM before performing a restore. To achieve this, I programatically get the vApp, specify delete for the VM and RecomposeVApp however : when I get a vApp by href, the recomposeVApp link is missing if the vApp is in running state and if I stop (undeploy) the vApp, I can get the recomposeVApp. Then I specify the VM to delete to RecomposeVApp before I restore files. I see that the task cleans up all files except current.png because of which the VM folder remains on the datastore and later on when I recreate the VM, CreateVM creates a new folder with _x suffix because the original folder still exists with current.png file alone in it, so in the end I land up seeing a lot of _x (_1, _2, _3 etc) folders.
A sample PostURL to recompose the VM with delete specified - "https://myvcd/api/vApp/vapp-eaf7beee-8701-44f8-9c85-80864cd81a42/action/recomposeVApp"
Please help.
Thank you.