VMware {code} Community
ajnelson
Contributor
Contributor

How to create large file on VMFS filesystem

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

Tags (1)
0 Kudos
1 Reply
phoenix_user
Contributor
Contributor

I do not know the answer to your question regarding vmfsctl . However, a solution that relies on software inside cos is not going to work on ESX versions that do not have COS (e.g. ESX3i). Perhaps the cloning functionality in VDDK (either the C library or the vmware-vdiskmanager) might work for you?

-Sudarsan

0 Kudos