2006/06/20

VMware Player Drag-n-drop HowTo

The freeware VMware Player is said to be able to drag and drop files between your guest virtual machine and your host operating system. That's partially true; you can drag and drop files only between a Windows based virtual machine and a Windows host. In the case of a Linux based virtual machine and a Windows host, VMware Player only supports textual copy and paste between them, and that only if the VMware Tools program is previously installed and running (even if minimized) in the guest operating system.

If you use VMware Player to launch VMware's Browser-Appliance virtual machine to browse the Internet, you will surely save pages and download other stuff you later will want to transfer and keep in some of your real (non virtual) hard disk partitions, instead of being kept inside the virtual machine's suspended virtual disk.

Textual copy-paste feature provided by VMware Player in this setup is useless for this task. The simplest solution is to transfer the files you want to export into a USB stick, then from there to the desired hard disk partition after unmounting the stick in the virtual machine. This procedure has the advantage you can keep the virtual machine running, but what if your USB stick is not big enough to hold your new files, you want a more direct technique or if you just do not have a stick at hand?

Then you will question yourself: how to copy (or paste) files from (or into) a VMware virtual machine's virtual disk formatted with an ext2 (or ext3) file system from a Windows XP host?

Good news: you can do that by mounting the virtual machine's virtual disk with VMware DiskMount Utility and accesing the mounted virtual disk through the Ext2 Installable File System For Windows driver. The drawback is that you have to previously turn off the virtual machine to be able to mount it. Partitions from suspended virtual machines cannot be mounted with the DiskMount utility.

Here are the steps you need to follow:
  1. Install the Open Command Here Powertoy for Windows XP
  2. Install VMware DiskMount Utility
  3. Install Ext2 Installable File System For Windows
  4. Go to Program Files\VMware folder.
  5. Right click on the VMware DiskMount Utility folder and click on the Open Command Window Here.
  6. Mount the virtual disk with this instruction:
    vmware-mount u: "drive:\path\virtual-machine.vmdk"
    where "drive:" and "path" are the drive and path where your virtual machine file is located.
  7. Go to My PC and refresh the drive list.
  8. Double click on the drive labeled "/media/sda1 (X:)", where X is the drive letter asigned to the virtual disk upon mounting.
  9. When you are done copying files, use this command to unmount a virtual disk so virtual machines can access it again:
    vmware-mount x: /d
    where "x" is the drive letter the virtual disk was previously mounted.
Tip: usually you will copy/paste files from/into the Home\user folder in the virtual disk. In the case of the Browser-Appliance virtual machine, the user name is VMware.