stan klimoff

Adding hard drives to Windows in VMWare Fusion

My MBP has two hard drives: one is a small 128G SSD, and another is a much bigger HDD. Naturally, I need both for Windows that I run in the dual-boot mode.

Supporting two hard disks in Boot Camp is straightforward; Windows was able to identify my drives so I just mapped the HDD as /opt with the device manager. However, I wanted the same experience within VMWare Fusion. Adding a raw partition as a disk is not something that Fusion exposes through UI.

After tinkering and googling around a bit I came up with the following recipe:

$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *320.1 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS opt                     159.9 GB   disk0s2
   3:       Microsoft Basic Data opt                     159.9 GB   disk0s3
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *120.0 GB   disk1
   1:                        EFI                         209.7 MB   disk1s1
   2:                  Apple_HFS Vertex                  98.5 GB    disk1s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk1s3
   4:       Microsoft Basic Data 7                       20.7 GB    disk1s4

disk0s3 is obviously what I need to mount. Need to create a VMDK for that:

$ cd ~/Library/Application\ Support/VMware\ Fusion/Virtual\ Machines/Boot\ Camp/Boot\ Camp.vmwarevm
$ /Library/Application\ Support/VMware\ Fusion/vmware-rawdiskCreator create /dev/disk0 3 opt ide

And bind it to the VM by adding the following into the VMX file: $ mate Boot\ Camp.vmx

ide1:0.present = "TRUE"
ide1:0.fileName = "opt.vmdk"
ide1:0.deviceType = "rawDisk"

(In my case, I had to remove existing CD-ROM definition on ide1:0 that Fusion created for me.)

Since the IDE channel and partition ID is the same, I did not even need to remount the drive in Windows, it picked that up by itself.

I may also want to cover advanced networking at some point. It is amazing how much stuff can be done under the Fusion’s hood.

— 8 months ago