packer-builder-vsphere
packer-builder-vsphere copied to clipboard
Support datastoreclusters
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 :).
This is absolutely valid feature request, and I'd love to see a pull request for this!
Feel free to open PR early.
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.
Ok awesome, will have one WIP open by Tuesday
Ooooh this would be super nice!
I came just to ask for this, please add this feature.