packer-builder-vsphere icon indicating copy to clipboard operation
packer-builder-vsphere copied to clipboard

Support datastoreclusters

Open ghost opened this issue 6 years ago • 5 comments

I would like to propose support of datastoreclusters. In our use case datastores are grouped in datastoreclusters akin to how clusters are used to group hosts. In our other vSphere related automation (i.e bootstrapping VMs based on templates) we already make use of a datastorecluster parameter, where we let vSphere decide on which datastore to place it.

This feature would make the datastore and datastorecluster parameter mutually exclusive since in case of the latter vSphere's DRS takes care of suggesting a fitting datastore inside the specified datastorecluster based on the size of all disks present inside the template.

Output of govc find . -type s:

/DC/datastore/DC1EXP01/xpaa_vi_215
/DC/datastore/DC1EXP01/xpaa_vi_217
/DC/datastore/DC1EXP01/xpaa_vi_219
/DC/datastore/DC1EXP01/xpaa_vi_221

Let me know if there is interest in this type of functionality and whether you consider a PR for this since I have this part working for the iso builder already based on govc's create inside the vm package. PR would of course include full support with clone and am sure will work with https://github.com/jetbrains-infra/packer-builder-vsphere/issues/68 as well (feature I'm looking forward to). See usage of the recommendDatastore function in create.go#L333 and declare in create.go#L455. I found this usage fitting quite nicely with this existing codebase, so all credit goes to them :).

ghost avatar Mar 23 '18 11:03 ghost

This is absolutely valid feature request, and I'd love to see a pull request for this!

Feel free to open PR early.

mkuzmin avatar Mar 23 '18 17:03 mkuzmin

I mean, open PR at an early stage. We may have to discuss design decisions. And I will definitely have questions how these datastore clusters work, never saw them before.

mkuzmin avatar Mar 23 '18 18:03 mkuzmin

Ok awesome, will have one WIP open by Tuesday

ghost avatar Mar 26 '18 07:03 ghost

Ooooh this would be super nice!

codyja avatar Apr 08 '19 17:04 codyja

I came just to ask for this, please add this feature.

johnafogarty4 avatar Nov 10 '19 20:11 johnafogarty4