Shared Folders on Linux Guest OS in VMware (Fusion/Workstation/Player)

Having VMs running around you will eventually need to pass some files between your host and guest OSes. This could be achieved in a number of ways, one of which (and the most convenient long term in my opinion) is to have a shared folder between the host and the guest.

This writeup was compiled on Mac running Sierra thus VMware Fusion was used. However basically the same steps could be applied to Player or Workstation running on Windows as a host OS. Here is the version I used specifically:

Screen Shot 2017-07-07 at 20.57.11

0. You are working with VMware, not VirtualBox, keep that in mind

Believe it or not but because I was so used to VirtualBox, first of all I installed “VirtualBox Guest Additions” for Linux guest OS and was wondering why the damned thing does not work. Spent quite some time until it hit me that I was trying to load VirtualBox stuff on VM that is being run by VMware…

1. Make sure OpenVM packages are not installed

You would need tools from VMware in order to have shared folders functionality, I learned it the hard way so you don’t have to. OpenVM does not support file system for mounting VMware shared folders.

Make sure this package is not installed on your guest Linux OS:
Screen Shot 2017-07-07 at 21.01.09

2. Install VMware Tools

Select your VM from Virtual Machines Library and use VMware menu item called “Virtual Machine”, you will see “Install VMware Tools” or “Reinstall VMware Tools” there, click on it.
Screen Shot 2017-07-07 at 21.02.59
Please note that it has to be done while VM is running.

Almost immediately you should see VMware Tools CD image being mounted inside your guest Linux OS:
Screen Shot 2017-07-07 at 20.58.45

See the tar.gz archive there? You should copy it somewhere, for example to Downloads folder in your home dir and unpack. Once you’re done unpacking, please run vmware-install.pl as superuser.
Restart your guest OS.

3. Create a folder on host OS and share it with VM

You could create a folder anywhere you can write to on your host filesystem. Then go to VM settings->Sharing, enable folder sharing and browse to your newly created folder. To make sharing as painless as possible please refrain from using spaces in shared folder name.
Screen Shot 2017-07-07 at 20.56.23

4. Enjoy the fruits of your labour

/mnt/hgfs on your guest should contain the shared folder now:
Screen Shot 2017-07-07 at 21.05.03

How to Boot with UEFI from USB Stick

Nowadays BIOS boot is considered to be “legacy” way of booting and EFI is the emergent default mode. However people still confuse the two and lots of tools for creating bootable media ignore EFI and go with standard BIOS boot.

So, what do you need to boot in (U)EFI mode?

  1. Obtain OS image/zip that is EFI-aware, having directory /boot/efi on the OS distribution is a good indication of EFI support
  2. Format USB stick with GUID(GPT) partition table and create a single FAT32 partition named using only CAPITAL letters
  3. Extract zip or image file into the root folder of your newly formatted USB stick
  4. Place your USB in non USB 3.0 slot, don’t know for sure why but you cannot boot from USB 3.0 slot

On OSX you can use Disk Utility for the above operations and on Linux, GParted comes to the rescue. I am sure you can easily do that on Windows too, either using standard admin tools or something like Partition Magic, however I did not check therefore can’t advise anything specific.

As for booting Windows and Linux in EFI there are guides how to do that, just search. Although the main requirement is GUID Partition Table, the best way of achieving that on your startup disk is to allow the Operating System to partition the drive during the installation as opposed to manual partitioning.

If you need to dual-boot into say Windows and Linux and you installed Linux in MBR mode but Windows in EFI then Grub will be unable to find Windows installation and you will have to select the correct boot drive on each boot, which will drive you mad eventually. Do not despair though, there is a great utility called Boot Repair, just load USB stick with some Live Ubuntu and then apt-get the boot-repair from there and you will have your situation resolved semi-automatically in the matter of minutes. Writing from personal experience as I was in exactly the above mentioned situation with dual-boot, this utility helped me to convert Linux loader into EFI and now it also allows me to select booting into Windows right from the boot menu.

 

Backup Your Files

After the important files are in order and synced between devices we sort of get them backed up this way to a certain extent of course – this backup will not make your workstation boot into OS again in case something bad happens with HDD or boot partition.. Below is the list of software I use for full partition/HDD backup.

Windows

Acronis True Image: it’s commercial, used it for years, restored backups successfully several times, allows creating live-cd to boot and restore HDD.

Linux

clonezilla + partclone: use for full disk backup, free as in beer & speech but make sure you have the compatible pair because clonezilla depends on partclone and in my case (Mint 17 disrto) default partclone was incompatible with default clonezilla version (issue was -z param of partclone). Seems the easiest way to get both correct versions of clonezilla and partclone is to use “Clonezilla Live” distribution on USB stick, installed using tuxboot.

You need a live-cd to boot & backup because partition/HDD you plan to backup has to be unmounted. I was actually looking into using Acronis for Linux but did not feel very enthusiastic about the price of this edition – it seems only Enterprise edition works on Linux with price tag around 1000$..

Deja Dup: home directory incremental backup/restore.

OSX

Time Machine? Not sure yet because did not set up backup on my Mac. Will be trying out that option but I’ve read it is now incompatible with Samba shares, however a workaround is available – will test that and update the post.

UPDATE (10.09.2015)
After almost a year I am finally ready to update this post with my OSX preference and this is SuperDuper!, whole disk backup.