Blog How to Enable Folder Share in Kali VM and Windows Host
@ Animesh Roy | Thursday, May 30, 2024 | 2 minutes read | Update at Thursday, May 30, 2024

OverView

Installing “Guest Tools” significantly enhances the user experience with VMware virtual machines (VMs). As of September 2015, VMware recommends using the distribution-specific open-vm-tools (OVT) instead of the VMware Tools package for guest machines.

kali@kali:~$ sudo apt update
[...]
kali@kali:~$
kali@kali:~$ sudo apt install -y --reinstall open-vm-tools-desktop fuse
[...]
kali@kali:~$
kali@kali:~$ sudo reboot -f
kali@kali:~$

Adding Support for Shared Folders When Using OVT Unfortunately, shared folders will not work out of the box, some additional scripts are needed. Those can be installed easily with kali-tweaks:

kali@kali:~$ kali-tweaks

ref image:

img

In the Kali Tweaks menu, select Virtualization, then Install additional packages and scripts for VMware. Congratulations, you now have two additional tools in your toolbox!

The first one is a little script to mount the VMware Shared Folders. Invoke it with:

kali@kali:~$ sudo mount-shared-folders

And with a bit of luck, check /mnt/hgfs/ , and you should see your shared folders. The second script is a helper to restart the VM tools. Indeed, it’s not uncommon for OVT to stops functioning correctly (e.g. such as copy/paste between the host OS and guest VM stops working). In this case, running this script can help to fix the issues:

kali@kali:~$ sudo restart-vm-tools

Optional:  Editing ‘/etc/fstab’

Even though simply adding the folder to the VM is enough for the folder contents to be accessed through a VM in Virtual-box, we need to do some changes in the VMware VMs.

Open a terminal of your choice and go to /mnt/hgfs

cd /mnt/hgfs

If you don’t see anything in the folder, there’s a good chance that you will need to follow the below steps :D

If the folder is missing, why not just create it with :

sudo mkdir /mnt/hgfs

open and edit fstab with a editor of your choice.

sudo vim /etc/fstab

enter the following at the end of the file, if you want this to work

vmhgfs-fuse /mnt/hgfs fuse defaults,allow_other 0 0

ref img

img

now save and reboot the vm

reboot -f 

it should work, and you can file all your shared folders under /mnt/hgfs dir, if not run this command again

sudo mount-shared-folders

Changes you need to make on your VM settings:

  1. In settings, goto tab options
  2. click on shared folders
  3. click on add... and locate your folder from explorer.
  4. ensure they’re enabled, as you can see the tick mark.

img

I hope you like this article.


© 2010 - 2024 Classroom

Reading Stuffs

Social Links

YOU CAN REUSE MY CONTENT