Use vmrun to inject the VersionGopher™ collector into a guest VM, run a full filesystem scan, and pull the results back - all through VMware Tools, without SSH or network configuration.
vmrun on PATH.vmx file for the guest VM you want to scan.# Adjust the path to match your VM location VMXPATH="/Users/you/Virtual Machines.localized/CentOS 7 64-bit.vmwarevm/CentOS 7 64-bit.vmx" # Start the VM headless (skip if already running) vmrun start "$VMXPATH" nogui
copyFileFromHostToGuest to transfer the collector binary. No SCP or shared folders needed.vmrun -gu <username> -gp <password> \ copyFileFromHostToGuest "$VMXPATH" \ ./version_gopher-linux-x64 \ "/home/user/version_gopher" vmrun -gu <username> -gp <password> \ runProgramInGuest "$VMXPATH" -activeWindow /bin/bash -c \ "chmod +x /home/user/version_gopher"
vmrun -gu <username> -gp <password> \ runProgramInGuest "$VMXPATH" -activeWindow /bin/bash -c \ "cd /home/user && ./version_gopher /usr/bin -o scan"
/usr/bin with any directory path. Use -r for recursive directory scanning, or / to scan the entire filesystem.
vmrun -gu <username> -gp <password> \ copyFileFromGuestToHost "$VMXPATH" \ "/home/user/scan.json" \ /tmp/centos-scan.json
# Via the API curl -F "file=@/tmp/centos-scan.json" http://localhost:5000/api/import # Or drag-and-drop into the web dashboard
copyFileFromGuestToHost to retrieve it. Always use runProgramInGuest -activeWindow, never runScriptInGuest (it hangs on some platforms).