Saturday, December 8, 2012

Add physical disk to VMware Fusion guest OS

This was not a big deal on VMware Workstation on my old Windows laptop, however today I realized that I'm unable just to add any external physical hard drive (attached to one of the USB ports) to VMware Fusion on my Mac.

After a few minutes of goggling, I realized that I have to create a .vmdk file that will represent a connection to my external hard drive and then add it to my guest OS container.

So, here is a step-by-step guide about how to add a physical HDD or SSD to your guest OS under Mac OS X 10.8 (should be work fine on 10.7 and 10.6 I suppose):
  1. First of all we should to figure out our hard drive name:
    1. launch Disk Utility (select Finder, click on the Go menu, select Utilities, launch Disk Utility.app)
    2. select your hard drive and press Info button on the top-left.
    3. remember Disk Identifier specified in the Information window ("disk1" in my case).
  2. Fire up Terminal.app (it is also located in the Utilities folder)
  3. Change current directory in Terminal to the WMware.app Contents/Library folder (you can simply copy and paste the following line: cd "/Applications/VMware Fusion.app/Contents/Library/")
  4. Now we should create a .vmdk file that will point to our external hard drive:
    1. paste the following line into the terminal (change disk1 to the disk name you've found in the step 1):
      ./vmware-rawdiskCreator create /dev/disk1 fullDevice ~/external-hdd ide
    2. This will create a new external-hdd.vmdk file in your home folder.
  5. OK, we're almost done. Now let's find our VMware guest os container and add to it just created link to our hard drive.
    1. open Finder and go to a folder where your virtual machines are located. (Documents › Virtual Machines in my case)
    2. do a right click on desired Virtual Machine to display a pop-up menu, select "Show Package Contents" this will allows us to view a directory with all corresponding files to this VM.
    3. move or copy external-hdd.vmdk from your home folder into this one
    4. do a right click on a file named like current VM with .vmx extension, select Open With › TextEdit
    5. scroll to the end of file, add following lines:
      ide1:1.present = "TRUE"
      ide1:1.fileName = "external-hdd.vmdk"
    6. save and quit
  6. That's it, now you can launch VM with attached external HDD or SDD!
BTW: If you want to boot from the external hard drive you've just attached, you have to modify boot order in the VMware BIOS.

If you know easiest way to do the same task, share it in the comments.

Let's something new begin

Alright, this is my first post here, I decide to write about a tech difficulties I face on every day basis.
Also, please note that English is my second language, so I'll appreciate any feedback and corrections.

So what I'm waiting for? Let's get started!












Photo by Bumbalina In Wonderland