Apologies if this is the wrong community for this question, but it seemed the closest to what I want.
My company is working on a tool that, among other things, creates VMDKs for use with ESX. We're working on a way to automatically upload the created VMDKs to ESX servers. One problem we're running in to is that best practices for VMFS suggest VMDKs should be pre-allocated and that using tools like scp to copy VMDKs over to ESX is a bad idea due to the fact that scp will keep appending to the file until it's transferred, as opposed to preallocating it first. Users of SCP are told to use Veem's tool or use vmfsctl to copy the VMDK into the repository, but neither of those options are acceptable to us for various reasons.
My question, then, is this: From C code running on the service console, what is the proper way to create a VMDK and subsequently populate it with data such that VMFS is properly utilized and an excess of SCSI reservations are not generated? Is there a VMFS system call for this, or a function exported from a library? How does vmfsctl accomplish it?
Thanks in advance for any help.
Adam