How to correctly modify the .vmx file in VMware Fusion 8.x
When running with VMware Fusion you sometimes are required to set settings for Virtual Machines which are not available through the settings menu. This means you should edit the .vmx file of that specific VM. An incorrectly edited .vmx file will result in a virtual machine that will not boot anymore and fails miserable. In this blogpost, I will go deeper in correctly editing the .vmx and how to fix a .vmx file that was altered incorrectly and is now broken. Also some nifty hidden gems are found along the way.
Always make sure, before you start modifying files, that you have a proper backup of that specific file. You can make a copy of the .vmx file or also copy the whole .vmwarevm bundle file for that specific VM. By editing the virtual machine configuration file directly can cause the VM to fail completely!!!
Modifying the .vmx file step-by-step
Step 1 – Open VMware Fusion if it was not open yet
Step 2 – When the Virtual Machine Library window is not showing go to Window > Virtual Machine Library on the Apple menu bar
Step 3 – Make sure the VM you want to edit is shut down and not running or in a suspended state!
Step 4 – Right Click on the VM you want to edit. A menu will open like the one in the picture below under Default
Some hidden gems are in this menu when you press and hold different keys, holding the (ALT) key will show you the option to Open Config File in Editor, while holding the (CTRL) key will reveal the option Show Config File in Finder and holding the (CMD) key will magically show the option to Open Latest Log File.
Better be safe than sorry
Step 5a – Choose the option Show in Finder, this will open a Finder window so you can copy/backup the VM file bundle <vm_name>.vmwarevm to a safe location
Step 5b – Hold the (CTRL) key and choose Show Config File in Finder. Right Click on the .vmx file and choose Duplicate. This will create a copy of the .vmx file in the same directory.
Step 6 – Hold the (ALT) key and choose Open Config File in Editor
Step 7 – TextEdit will open with the .vmx file. Before doing anything in the .vmx file make sure you go to the TextEdit menu bar and select Preferences. Check if Smart quotes is unchecked, if not make sure you uncheck it! Otherwise you will end up with a VM that fails to boot.
Step 8 – Make changes to the .vmx file and when finished just close the window so it gets auto-saved. Your changes will not take effect until you close down VMware Fusion completely.
An alternative way to be sure you won’t mess up the .vmx file while editing, you can use a Terminal session and modify the .vmx file with a nano or vi editor. You can do it like this:
Step A1 – Press (CMD) + (Spacebar) to open Spotlight Search and type Terminal and press (Enter) to start a Terminal session.
Step A2 – Browse to the .vmx file with cd and ls –l commands and use the (TAB) key for auto completion. Than use an editor like nano or vi to edit the .vmx file.
Step A3 – After editing the .vmx file in nano press (CTRL) + (X) and answer with (Y)es. For the vi editor use :x for exit with saving changes. ( :q! to exit and ignore any changes)
When the virtual machine (VM) fails to boot in VMware Fusion, most likely the .vmx file has been modified with an editor which corrupted the layout like TextEdit with Smart quotes enabled would do! Open the .vmx file through the alternative way and look for “ which look slightly different than the rest. Often when you remove those quotes or that specific line and add the line again will fix the file so you can boot the VM again in VMware Fusion.
- Getting started with Photon OS by Anne Jan Elsinga
- How to install HyTrust KeyControl 5.1 in vSphere 6.7 by Edwin Weijdema
- How to use remote access authentication in your… by Erik Scholten
- Using Puppet Bolt to install vRealize Endpoint… by Dimitri De Swart
- Unable to backup iSCSI volume with Veeam Agent for Windows by Edwin Weijdema