VMware Communities
dxiv
Contributor
Contributor

Finding shared folder hostPath

Is it possible to figure out the hostPath of a shared folder from within a VM guest - either using a utility to that effect, or writing some custom code?

Barring that, is there a unique ID of a running VM guest which would allow the host to identify it and locate its .vmx - again, either using an external utility, or by code?

Use-case is a scenario where the guest saves a file to a shared folder, then must notify the host to process it. Somewhere along the way, the guest path has to be translated to the host path. Hope is this could be automated, rather than having the path mappings from the .vmx duplicated elsewhere.

Thank you.

0 Kudos
3 Replies
dxiv
Contributor
Contributor

P.S.  Even a "not possible" answer would be appreciated, pointers as to why more so. Thanks.

0 Kudos
continuum
Immortal
Immortal

setSharedFolderState     Path to vmx file     Modify a Host-Guest shared folder

addSharedFolder          Path to vmx file     Add a Host-Guest shared folder

removeSharedFolder       Path to vmx file     Remove a Host-Guest shared folder

enableSharedFolders      Path to vmx file     Enable shared folders in Guest

disableSharedFolders     Path to vmx file     Disable shared folders in Guest

listProcessesInGuest     Path to vmx file     List running processes in Guest OS

killProcessInGuest       Path to vmx file     Kill a process in Guest OS

runScriptInGuest         Path to vmx file     Run a script in Guest OS

deleteFileInGuest        Path to vmx file     Delete a file in Guest OS

createDirectoryInGuest   Path to vmx file     Create a directory in Guest OS

deleteDirectoryInGuest   Path to vmx file     Delete a directory in Guest OS

CreateTempfileInGuest    Path to vmx file     Create a temporary file in Guest OS

listDirectoryInGuest     Path to vmx file     List a directory in Guest OS                 

CopyFileFromHostToGuest  Path to vmx file     Copy a file from host OS to guest OS                     

CopyFileFromGuestToHost  Path to vmx file     Copy a file from guest OS to host OS

renameFileInGuest        Path to vmx file     Rename a file in Guest OS

thats from vmrun helpscreen - if you are lucky you can get away with that functionality


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
dxiv
Contributor
Contributor

Thank you, but I had already looked at the vmrun help screen (and more). All that you quoted presumes knowledge of the .vmx path on the host. The guest doesn't know it, and the host can't locate it unless it knows already which particular guest it's looking for - which is precisely what my question was about. I guess your reply amounts to "it's not possible", which is somewhat disappointing though not entirely unexpected.

However, I am not an expert in VMWare programming and APIs, so it's not clear to me that "not possible via vmrun" is the same as "not possible at all, period".

0 Kudos