VMware Cloud Community
olegmeister
Contributor
Contributor

Redeploy All VMs through the vcloud API

Hi, I've been looking through the dev guide for vcloud 1.5 and I can see that there's a way to perform many Host operations programmatically: enable/disable host, prepare/unprepare, etc. But there's no way to Redeploy All VMs through the API.

Could someone suggest a way of doing this?

Thank you

fyi: http://www.vmware.com/pdf/vcd_15_api_guide.pdf

0 Kudos
2 Replies
tsugliani
VMware Employee
VMware Employee

Hi,

At the moment this a known parity issue between the GUI and the API.

For now to achieve the same intended behavior, is to get the vCenter instance where that host is through the vCloud API (you could have more than 1 vCenter attached to your vCloud infrastructure) and then get that host to go into maintenance mode through the vSphere API (VIM).

This should do what you want.

Hope this helps,

0 Kudos
olegmeister
Contributor
Contributor

It helps, thank you. But just a bit more hand-holding for the uninitiated, please.

Yes, migrating through the vcenter will work, but can you recommend a best practice for this so as to keep the vcd inventory  consistent? For eg how does vcd pick which host to redeploy to?

What else bears keeping in mind? Migrating through vcenter requires vmotion but I think I was able to redeploy with vcd with vmotion disabled...

Thanks

0 Kudos