Wednesday, May 15, 2013

VMware Fusion Sharing Folders with Ubuntu as the Guest Operating System

If you created a new Ubuntu VM in VMWare Fusion and told it to automatically mount your home folder only to find out that, after you finished set-up, it wasn't mounted, don't worry. It's easy to fix. In fact, this is just a really quick post to say that, if you're looking to get shared folders working on Ubuntu with VMware Fusion, the instructions in the VMware knowledge base regarding installing VMware tools on Ubuntu are correct, but there's one caveat... you need to have the build-essential and linux-headers packages installed first. Here are all of the steps on one page:

  1. While your VM is running, in your host environment select Virtual Machine > Install VMware Tools (or Virtual Machine > Reinstall VMware Tools).
  2. Make sure you have the build-essentials and linux-headers packages installed sudo apt-get install build-essential
    sudo apt-get install linux-headers-`uname -r`
    *chances are, the linux-headers are already installed, but just in case
  3. Choose Virtual Machine > Reinstall VMWare Tools and click Install to load the VMWare Tools virtual cd-rom.
  4. Now, mount the cdrom to the file system:
  5. sudo mkdir /mnt/cdrom
    sudo mount /dev/cdrom /mnt/cdrom
  6. Extract the VMware Tools to the /tmp/ directory. Note that the x.x.x-xxxx should be replaced with the version numbers on the actual file: tar xzvf /mnt/cdrom/VMwareTools-x.x.x-xxxx.tar.gz -C /tmp/
  7. Change directories to the /tmp/ directory and run the script: cd /tmp/vmware-tools-distrib/
    sudo ./ -d
    *The -d modifier in the last command above tells the installer that you want to accept all of the defaults. If you want to supply your own answers to the installer, do not use this modifier.
  8. Reboot Ubuntu: sudo reboot
  9. When the Ubuntu boots back up, look in the /mnt/hgfs folder and your shared folders should be there: ls /mnt/hgfs

Disclaimer: I tested this using Mac OS X 10.8.3 Mountain Lion as the host operating system and Ubuntu 12.04 Server LTS 64-bit as the guest operating system using VMware Fusion v5.0.3.