Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sevaine/cbcf9a1debd9bb17c6c9 to your computer and use it in GitHub Desktop.
Save sevaine/cbcf9a1debd9bb17c6c9 to your computer and use it in GitHub Desktop.
Changing the default VM Path in VMWare Fusion on OSX Yosemite

Changing the default VM Path in VMWare Fusion on OSX Yosemite:

I had a little trouble figuring this out - so making a note of it. The VMWare Fusion default location for VMs is ~/Documents/Virtual Machines.localized, which doesnt work well for me as I typically have Documents symbolically linked to my Dropbox directory and prefer to move the default VM location rather than manage exclusions on every Dropbox install I have.

It's relatively straightforward on VMWare Workstation, and Oracle VirtualBox - but for some reason not well documented in VMWare Fusion. Turns out it's relatively simple to update, so here it is so I don't forget the next time I need to do this. Saving as a public gist in case it's of value for anyone else.

I'm using VMWare Fusion v6, haven't tested on other versions - but I suspect it'll work on them. Need to test this.

Changing the default VM Directory for VMWare Fusion

Open up ~/Library/Preferences/VMWare Fusion/preferences in your favorite text editor

cd ~/Library/Preferences/VMWare\ Fusion
cp preferences preferences.backup
vi preferences

Look for a line starting with prefvmx.defaultVMPath. If it is present in the file, update the directory assigned to it to the new default VM directory. If it's missing, add it to the bottom of the file and save your work. Quit VMWare Fusion if it is running. Start VMWare fusion and attempt to create a new VM, anything will do. Once done - check that the files have ended up in the new default VM directory.

Finally -- quit VMWare Fusion again, and move the contents of ~/Documents/Virtual Machines.localized to your new default VM directory.

cd /Users/MY_USERNAME/VirtualMachines/VMWareFusion
mv "/Users/MY_USERNAME/Virtual Machines.localized/*" ./
rmdir "/Users/MY_USERNAME/Virtual Machines.localized"

Start VMWare Fusion again and you should see any pre-existing VMs available in the Virtual Machine manager.

@Jim2435074
Copy link

slight typo I think. In Sierra, that should be "pref.vmx.defaultVMPath"

@rgrunloh
Copy link

rgrunloh commented Jan 8, 2017

[update 20jan17: after working fine for a couple of weeks Fusion suddenly lost all VM's. Rather than fight it, going back to default setup. So don't trust what I posted below ;-) ]

I copied the "Virtual Machines.localized" directory to another disk, renamed the original, then I had to add "prefvmx.defaultvmpath" (all lower case) to the file, and then had to use the "open recent" menu to get fusion to open them. Sierra 10.12.2 and vmware fusion 8.5.3.

When the parameter was prefvmx.defaultVMPath with uppercase it seemed to be ignored.

@stefanlasiewski
Copy link

Similar to rgrunloh, I had to "prefvmx.defaultvmpath" (all lower case) to the preferences file. All of the icons in the "Virtual Machine Library" were blank and did not point to valid images. I had open every single VM from either the "open recent" menu or from the Mac Finder.

I'm using Mac OS Sierra 10.12.5 and VMware Fusion Pro 8.5.7.

@nhooyr
Copy link

nhooyr commented Aug 17, 2017

👍

@zapstar
Copy link

zapstar commented Aug 29, 2017

@Jim2435074 is wrong. It is prefvmx.defaultVMPath as OP mentioned.

@ijaxon
Copy link

ijaxon commented Feb 17, 2018

It appears this option is no longer present in VMWare Fusion v10. Just move the VM or entire folder to another directory and double-click the VM's icon. A Dialog box will say it can't find VM. Click "I moved it." You'll note the VM listing on the left has blank icons in the browser on the left. You can delete those after you've started the VM it will create another one.

@miladmikeal
Copy link

@ijaxon Will you have to do that every time you create a new VM, or will the new ones automatically be stored in the new 'Virtual Machines" folder location?

@kode54
Copy link

kode54 commented Sep 19, 2018

This folder does not exist in VMWare Fusion v10. There is a ~/Library/Application Support/VMware Fusion/, but it's empty.

E: It appears it doesn't create the ~/Library/Preferences/VMware Fusion/ folder until after the first virtual machine is created and ready to launch. I did, however, direct it to save the VM outside of iCloud Documents, in the Virtual Machines.localized that it created, which I had already moved out of Documents. I can now use the configuration option in case I need to create future virtual machines.

E2: I just opened the preferences file, only to discover that it had already changed the prefvmx.defaultVMPath setting to match the newly moved Virtual Machines.localized folder.

@mundo01
Copy link

mundo01 commented Jun 25, 2020

I'm aware that this thread started in 2017, wanted to update on my experience with Fusion 11.5.3. I moved without terminal, I simply created a directory on an external drive called Virtual Machines and I moved the VMs to the new directory. Deleted the old directory, and launched the VMs by directly selecting them in their new locations. I prompt popped, asking if I moved or copied the VMs, I selected Moved. And it launched the VM.

@abrahamfast
Copy link

done

@treimers
Copy link

I found this article for Fusion 11 and 12:

https://docs.vmware.com/en/VMware-Fusion/11/com.vmware.fusion.using.doc/GUID-ECE9C823-8EE2-44AB-A72B-3C37B76F5193.html

According to that Fusion uses the last location used as default for future VM creations:

When you use Fusion to create a virtual machine and you specify a virtual-machine location, instead of accepting the default, your specified location becomes the default the next time you create a virtual machine with Fusion. 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment