Unable to open file “…/Boot Camp.vmwarevm/Boot Camp.vmdk”: The system cannot find the file specified

This post was originally published on this site

If you have a BOOTCAMP volume and you randomly get Unable to open file “…/Boot Camp.vmwarevm/Boot Camp.vmdk” errors when launching VMWare Fusion it could be because the disk volume has changed upon boot. You cannot be guaranteed that the disk assigned to your BOOTCAMP volume is the same each boot. For me it will randomly change between disk0 and disk1.


So I wrote a little script to run at startup that will change the disk to the correct one.


The script assumes your BOOTCAMP volume is named BOOTCAMP. Also replace YOUR_USERNAME with your user name.


Create a script called vmware_fix.sh:

FILE_VMDK="/Users/YOUR_USERNAME/Library/Application Support/VMware Fusion/Virtual Machines/Boot Camp/Boot Camp.vmwarevm/Boot Camp.vmdk"
DRIVE_NEW=$(diskutil list | awk '/BOOTCAMP/{print $NF}' | cut -c 1-5)
if grep -q disk0 "$FILE_VMDK"; then
if grep -q disk1 "$FILE_VMDK"; then
sed -i.bak "s/$DRIVE_OLD/$DRIVE_NEW/g" "$FILE_VMDK"

Make sure you change the FILE_VMDK value to be the full path to your Boot Camp vmdk file.


Set the script to executable:

chmod +x ./vmware_fix.sh


Copy the file to /Users/YOUR_USERNAME/Applications/


Create a file called com.vmware.Fix.plist and paste the following:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">


Copy com.vmware.Fix.plist to /Library/LaunchDaemons and run the following commands:

sudo chown root /Library/LaunchDaemons/com.vmware.Fix.plist
sudo chgrp wheel /Library/LaunchDaemons/com.vmware.Fix.plist
sudo launchctl load -w /Library/LaunchDaemons/com.vmware.Fix.plist


Hope this helps anyone else in a similar situation.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.