VMware Cloud Community
vernon_wells
Contributor
Contributor

Method's not in the public API (datastore browsing and file copy)

Is there any chance of making the API's around datastore browsing and file copy public? I was trying to copy a virtual machine down to my local machine and just out of curiosity I fired up Onyx thinking it would be a useful thing to script.

WARNING: Method 'RetrieveInternalContent' is not available in the public API.

WARNING: Method 'NfcFileManagement' is not available in the public API.

0 Kudos
2 Replies
lamw
Community Manager
Community Manager

I've asked the same, but not all Internal APIs are ready or for public consumption. You can find a bit more details in this document from some of the digging I've done with the internal APIs -

VMware extensively uses NFC to primarily to import/export VMs in the OVF format and as referenced in the internal API document, there are a few dedicated NFC methods/etc that aren't exposed in the public facing APIs.

Though for general file management, you should be able to accomplish majority of the tasks using fileManager and if I'm not mistaken, there should be some PowerCLI cmdlets that also implement this I believe. I'm sure the PS master's can confirm on this

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Twitter: @lamw

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

LucD
Leadership
Leadership

Yes, there is a PowerCLI cmdlet that copies files, it's called Copy-DatastoreItem.

But there were reports of some problems.

And you could use the datastore provider. See chapter 3 in the vSphere PowerCLI Administration Guide.

But as Carter already mentioned, this is apparently not ready for production in the current build.

You might also have a look at the Copy-TkeDatastoreFile function in the Community Extensions.

That provides a HTTP-based transfer.

____________

Blog: LucD notes

Twitter: lucd22


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference