Anders Brownworth

Technology and Disruption

Using a Physical Volume to Boot a VMWare Fusion VM

Booting a VMWare Fusion virtual machine from an external hard disk isn't directly supported. Rather, you must bit copy the disk onto a local filesystem and create a virtual machine that uses that instead. There isn't a GUI tool on the Mac that does this so some people don't think this is possible. However, with several command-line tools it is very do-able. Here's how I took a Windows install off of an old laptop drive (the laptop had broken and wouldn't turn on) and onto a VMWare virtual machine.

I plugged the drive into my Mac using a multi-purpose "laptop drive to USB" contraption I had lying around. You can use disk enclosures or actually install the disk in your computer - whatever is easiest.

I needed to find out what device in /dev references the drive I just plugged in. As it happens, when you plug in a USB disk, the proper devices get automatically created so all I had to do was reverse list the devices in /dev to find out that /dev/disk5 was the answer for me:

ls -lrt /dev

but you might run "/Applications/Utilities/Disk Manager" to find out as well.

The next step is to look at the partition table on the drive using vmware-rawdiskCreator (a command-line application in /Library/Application Support/VMWare Fusion) and find out what partition number vmware-rawdiskCreator in it's view of the world. In my case, there was only one.

/Library/Application Support/VMware Fusion/vmware-rawdiskCreator print /dev/disk5
Nr Start Size Type Id Sytem
-- ---------- ---------- ---- -- ------------------------
1 63 117194112 BIOS 7 HPFS/NTFS

There is only one partition on this disk not too surprisingly numbered "1".

Then we use vmware-rawdiskCreator to create a "link" (just two text files) to the partitions you want converted. Here, I'm creating a set of files starting with "laptop-drive-link" that point to /dev/disk5, partition 1 and emulating an "ide" device.

/Library/Application Support/VMware Fusion/vmware-rawdiskCreator create /dev/disk5 1 laptop-drive-link ide

Then we actually do the bit copy: (run the command sans options to see how to use it)

/Library/Application Support/VMware Fusion/vmware-vdiskmanager -r laptop-drive-link.vmdk -t 0 laptop-drive.vmdk

And lastly, create a new virtual machine in Fusion and use the new .vmdk file the above command created as the "existing virtual disk" for your new machine. Takes some space, but easy to do.

That should do it!

Comments (5)

Dan from Plano/Texas/USA

Great tip, sir. worked nicely. Thanks! PS- love your version of CAPTCHA

Michael from Switzerland

Thanks!

Bob from Mexico

Worked perfect. Thanks for the tip man.

reiniertc from Netherlands

Kudos big time!
I've struggled to convert my physical drive, but finally it worked!

In cae people can't find the mentioned vmware tool, you can find some helpfull info here:
http://www.tech90.com/2012/07/10/missing-vmware-rawdiskcreator/

Chris Johnson from San Francisco, CA, USA

THANK YOU so very much for this tutorial. It is greatly appreciated.

I'm using VMWare Fusion 7.1. The command line tools are now found here:

/Applications/VMware\ Fusion.app/Contents/Library/

In order to get mine to work, I had to prepend the commands with "sudo" and use my password. And, the resulting files didn't have the proper permissions; I had to "Get Info" on the files and give myself read and write access.

Leave a Comment

Name:
Location: (city / state / country)
Email: (not published / no spam)
Comment:

No HTML is allowed. Cookies must be enabled to post. Your comment will appear on this page after a moderator OKs it. Offensive content will not be published.

Click the puppy to submit your comment.

To create links in comments:
[link:https://andersbrownworth.com/] becomes https://andersbrownworth.com/
[link:https://andersbrownworth.com/|AndersBrownworth.com] becomes AndersBrownworth.com
Notice there is no rel="nofollow" in these hrefs. Links in comments will carry page rank from this site so only link to things worthy of people's attention.