12.0

Table Of Contents
Guest to Host File Operations
n To copy a file from the host to a guest, the user must have write permission on the
destination.
vmrun -gu guestUser -gp guestPassword copyFileFromHostToGuest Ubuntu16.vmwarevm/
Ubuntu16.vmx ~/img.db /tmp/img.db
n To copy a file from a guest to the host, the user must have read permission on the source file.
vmrun -gu guestUser -gp guestPassword copyFileFromGuestToHost Ubuntu16.vmwarevm/
Ubuntu16.vmx /home/username/addr addr.txt
n To enable shared folders.
vmrun enableSharedFolders Ubuntu16.vmwarevm/Ubuntu16.vmx
n To share a folder on a Mac host with a particular Linux guest.
Note Before sharing folders, you must enable them with the enabledSharedFolders option, or
by selecting Enable Shared Folders in the Sharing Settings panel of the virtual machine. On
Linux guests, the
/mnt/hgfs directory is available for sharing, but you can use a different
directory for shared folders.
vmrun addSharedFolder Ubuntu16.vmwarevm/Ubuntu16.vmx sharedFolderName ~/Share
n To make a shared folder readonly or to delete the shared folder.
Note Shared folders are writable by default.
vmrun setSharedFolderState Ubuntu16.vmwarevm/Ubuntu16.vmx sharedFolderName ~/Share
readonly
vmrun removeSharedFolder Ubuntu16.vmwarevm/Ubuntu16.vmx sharedFolderName
Note On Windows Vista and Windows 7 or later guests, only the Administrator account can
use copyFileFromHostToGuest and deleteFileInGuest options to write and delete files in the C:\
and system folders, or use the createDirectoryInGuest and deleteDirectoryInGuest options to
modify system directories. Regular users, even those with administrator privilege, cannot
perform these operations.
Guest Variables and Environment
n From the host, set a guest variable on the virtual machines.
vmrun writeVariable Win10.vmwarevm/Win10.vmx guestVar vmstartdate 21April2017
n On the guest operating systems, read the guest variable that you just set.
> rpctool.exe "info-get guestinfo.vmstartdate"
$ vmware-rpctool "info-get guestinfo.vmstartdate"
Using VMware Fusion
VMware, Inc. 203