Sometimes I get really surprised at where does my time and days go and here is one example.
Yesterday evening I decided that I needed to share a folder on my macOS so that the Kali Linux 2020 VM can have access to it. The vm was created in VMWare Fusion, so it makes sense to look for sharing feature in the VM settings.
This is how it looks like after I added a folder and called it kalish and checked the checkmark Enable Shared Folders.
It also warns us about VMware Tools.
Next, start the VM.
Open the Terminal and browse to the Host Guest File System (HGFS) folder by running this command:
user@kali:~$ cd /mnt/hgfs
At this point you’re all set and done …unless you have done the below.. :D
⚠️ Whenever the Linux kernel (Operating System) is updated, VMware Tools will need to be reinstalled.
So actually, it happened so that prior to mounting the shared folder I have also updated the vm using the following commands in the terminal, so I had to reinstall the VMware tools.
user@kali:~$ sudo apt update
user@kali:~$ sudo apt full-upgrade -y
user@kali:~$ [ -f /var/run/reboot-required ] && sudo reboot -f
Reinstalling VMware Tools
As in the image on the left, in the VMware Fusion menu bar click on Virtual Machine > Reinstall VMware Tools, you will see a pop-up (see the image below) which basically has written out all the further steps you need to take in order to successfully install the VMware tools.
After you click on Install, there might be another pop-up
In my case, I haven’t ejected the linux.iso which was occupying the drive and hence throwing this pop-up. Anyways, click on Yes to proceed.
Open with the File Manager, as suggested, and unpack the contents .tar.gz to any preferred location.
Now all you need is to run the installation script from the terminal like this Ensure the file is executable (
chmod +x vmware-install.pl):
user@kali:~$ sudo ./vmware-install.pl
The command prompt will be asking different questions, I went with all the defaults.
At this point the mounting should succeed, and you should be able to browse the mounted folder.
While trying to figure out all those details I also came across a neat feature. You can sort of go deeper into the VM files and configure the sharing details from there, like deleting a desktop icon of the shared folder, etc.
Editing the .vmx file for your VMware Fusion virtual machine
In the Virtual Machine Library window, right-click on the vm > Show in Finder. Then open the vm’s package contents
And now you can edit the vm’s sharing settings by altering the values in the .vmx file in any text editor of your choice:
VMware Tools for a Kali Guest | Kali Linux Documentation
Should you decide to create your own VMware installation of Kali Linux rather than using our pre-made VMware images…