VMware Cloud Community
creativeview
Contributor
Contributor

Workflow or actions for Datastore clusters

Hi,

I am working on a workflow to deploy windows VMs from a template and need to place this on a datastore cluster. Currently there are no workflows that do this and also no actions to work with datastore clusters. Is support for this going to be provided soon or does anyone have examples of getting this to work by creating their own actions with the vSphere API.

Thanks,

David 

0 Kudos
4 Replies
dvatov
VMware Employee
VMware Employee

Hi David,

Run one of the Clone ... workflows for virtual machines (i.e. Clone virtual machine, no customization) and select the template you need to clone. With the default inputs this workflow will deploy a virtual machine. Select local storage that is part of the datastore cluster when configuring the new virtual machine. This should place the new virtual machine on the datastore cluster.

Daniel

0 Kudos
creativeview
Contributor
Contributor

Hi Daniel,

That will place the VM onto the selected datastore and not look at where it is best placed in the cluster. So if I have datastore1 with only 10Gb of free space and I try to place a 30Gb VM on it, the workflow will fail instead of placing the VM onto a datastore with more space within the cluster.  If you use the vSphere Client you can deploy a template onto a cluster and it will work out where it is best placed.

David

0 Kudos
dvatov
VMware Employee
VMware Employee

Hi David,

I think that datastore cluster does not do the initial placement of the disks. It is the vSphere client that verifies that virtual disks will fit on the datastore that you select in the Deploy from template wizard. You can customize workflow to check datastore.summary.freeSpace that is big enough. Once the virtual machine is deployed datastore cluster will move the disks to balance the used space.

Daniel

0 Kudos
creativeview
Contributor
Contributor

Just to update this thread for future reference incase anyone finds it.. It is possible to deploy a template to a datastore cluster but there is no workflow or actions to do it currently in Orchestrator.

From using VMware Onyx it's possible to get a code sample and work from that. The key bits of the API to look at are VMware.Vim.StoragePlacementSpec and VMware.Vim.StorageDrsPodSelectionSpec

David

0 Kudos