VMPlayer is a great alternative to VirtualBox to test out new software. Virtual Machines are your digital playground for evaluating new software to avoid messing with your production environment (likely your home media server) and breaking something. In another post, I showed you how easy it is to install Debian in a virtual machine using VMPlayer on Windows. Now I will show you how to pimp your virtual machine to make your life super convenient.
After installing VMWare tools you will be able to drag and drop files between your host and virtual machine, map shared folders for your virtual machine to use and share your clipboards. All of these features (many of which were unreliable for me using Virtualbox) make virtual machines very powerful tools.
|Private Internet Access|
($3.33 / month)
($4.91 / month)
($6.41 / month)
Install Debian VMware Tools on VMWorkstation Player
Run your Debian virtual machine from VMPlayer or VMWorkstation.
First we need to mount the VMware tools disk image, then we can install VMware tools on the Debian virtual machine.
Mount VMware Tools on Debian
Usually you will be prompted to install VMware Tools for Linux so click Download and Install
Install the required building tools and linux headers for Debian, use SSH or the Terminal.
sudo apt-get update sudo apt-get install uuid-runtime build-essential linux-headers-$(uname -r) -y
Mount the VMware tools that VMPlayer inserted into the virtual CD drive.
sudo mkdir /mnt/vmwaretools sudo mount /dev/cdrom /mnt/vmwaretools
You should see one of the messages below, both mean the disk image was mounted in the virtual drive.
mount: block device /dev/sr0 is write-protected, mounting read-only mount: /dev/sr0 already mounted or /tmp busy
If you get this error then click Install VMTools from the VMPlayer menu again.
mount: no medium found on /dev/sr0
Enter the mount point for VMWare tools on Debian then try and list the directory contents.
cd /mnt/vmwaretools ls
If you get this error, reboot and mount the VMWare virtual disk again.
ls: reading directory .: Input/output error
Install VMWare Tools on Debian
Unpack the VMWare tools tar file
cd /mnt/vmwaretools tar -xf VMwareTools* -C /tmp
Enter the following commands in the terminal to finish installing the VMWare tools.
Enter the vmware tools directory we have just unpacked.
Run the VMware tools perl installer with sudo (administrative) powers and accept the defaults, you can skip all prompts and automatically accept the defaults with the
sudo perl vmware-install.pl --default
You will get a warning, make sure to say yes.
open-vm-tools are available from the OS vendor and VMware recommends using open-vm-tools. See http://kb.vmware.com/kb/2073803 for more information. Do you still want to proceed with this legacy installer? [no] yes
You can accept the defaults by pressing enter for the rest of the options except automatic kernel modules.
Would you like to enable VMware automatic kernel modules? [no] yes
You will see a bunch of output, when it’s done you need to reboot which you can do with this command.
Now you have the VMware tools you can easily copy and paste text between your host machine and virtual test environment.
You can also drag and drop files between your virtual machine and host machine.
Enable Shared Folders in VMPlayer
The other benefit of the VMware tools is sharing a directory/folder on your host machine with your virtual machine so you can read and write to it as if it were a local folder.
To enable shared folders for your Debian virtual machine, select the virtual machine and click Edit virtual machine settings.
Click the Options tab and click Add under the Folders box
Browse to the folder on your host machine that you want to share.
Choose a Name so you can easily identify it on your virtual machine
Make sure Enable this share is checked.
Choose the permissions, make it read only if you don’t want the files on your host machine to change.
You can repeat the process to create multiple shared folders, some can be read access while others can have read and write access. Do think about the permissions so that your virtual machine doesn’t unwittingly destroy important data on your host machine.
You will find your shared folders in /mnt/hgfs. You can list the directory contents like this
cd /mnt/hgfs ls
I see my htpcguides folder for testing the guides I create for this site.
root@debian7-x64:/mnt/hgfs# ls htpcguides
Now clone your virtual machine (or any operating system) so you can keep your fully prepped Debian image with VMware tools, mapped shared folders and other software nice and clean – instead you will use an exact copy of the virtual machine to play around on.