Understanding VMware VMX Configuration Files – Learn How To Create and Edit VMX Files

In our article called VMware Disk Files Explained, we talked about the different VMware files on disk. In particular, we talked about the important VMware VMX configuration file. In this article, we’ll go into more details on this critical VMX file.

What are VMX Files?

In our previous article, VMware Disk Files Explained, we covered how a VMX file is the primary configuration file for a virtual machine. When you create a new virtual machine and answer questions about the operating system, disk sizes, and networking, those answers are stored in this file. As you can see from the screenshot below, a VMX file is actually a simple text file that can be edited with Notepad. VMX files are located in each of the folders of each of your virtual machines. For example, my Window XP Professional virtual machine is located in c:’Virtual Machines’Windows XP Professional and it is called Windows XP Professional.vmx.

When I right-click on that VMX file and click Open With and Wordpad, Here is what I see:

If you just double click on the file, it will open in your VMware Server Console.

Exploring a VMX File

If we look into more detail, we can see the syntax of a VMX file and how it is constructed. Here are important tips and syntax of note:

  • A hash (or pound sign, #) are used for comments. Thus, anything that starts with a # sign is ignored and considered a comment.
  • The displayName is what is used on the VMware Tab to identify the virtual machine. This can be whatever you want to make it but I suggest something short that still uniquely identifies the virtual machine. In this case, our virtual machine is called “WinXP”.
  • The memory of the virtual machine is determined by the memsize line. In our case, our memory is 512 because of memsize=512. While you can set the memory to whatever size you want, it must be a multiple of 4.
  • The guestOS is one of these possible values: GUEST OS Options
  • The virtualHW.version is a required parameter. It tells VMware what VMware version this VMX is meant for. All VMware VMX files that run on Workstation, Player, or Server are version 4. Thus, you need virtualHW.version = “4”
  • As VMware disk drives can either be IDE or SCSI, you will see both represented in the VMX file. The VMX doesn’t tell you the size of the virtual hard drives, nor the full path. It does tell you the name of the VMDK, VMware virtual disk file. In our case, this looks like:ide0:0.fileName = “Windows XP Professional.vmdk”
  • The only 3 parameters required to make a VMX file are:
  1. virtualHW.version=”4″
  2. config.version=”4″
  3. guestOS=”winxppro”

Once created, you can double-click on it and it will open in your VMware workstation/player/server, like this:

However, in setting only these 3 parameters  in a VMX file, you will get a virtual guest OS that only has 32MB of RAM, a floppy drive, and 1 CPU. The system won’t have any hard drives or CD drives.

  • If you have a line like scsi0.present = “TRUE” or ide0.present = “TRUE”, the vmware product looks for further config for these devices. If this is set to FALSE, then any further config is ignored.

Creating/Downloading VMX Files

You can actually download VMX files, based on answers you create, from the Internet. Here are some websites that allow you to do this: EasyVMX! link out ico VM Builder link out ico vmx-builder.cmd link out ico

One benefit to having a program create a VMX file for you is that there shouldn’t be any typos.

Summary

VMware VMX files are the configuration file for VMware guest operating systems. They can be short of very long. The more devices added, the more they grow. You can, of course, use the VMware GUI yourself to create the virtual guest configurations but, for VMware users who want to learn more about VMware, inner knowledge of the VMX file makes sense. Also, being able to edit these yourself or download one from the Internet can save you a lot of time!

Do you have questions or comments about VMware and the VMware VMX files? Checkout our VMware Discussion Forum!

FAQs

What software can I use to open VMX files besides VMware products?

VMX files can be opened with various text editors like Sublime Text, Visual Studio Code, or Atom. However, to actually execute a VMX file and run the virtual machine, you’ll need VMware products such as VMware Workstation, ESXi, or VMware Fusion for Mac. Alternative virtualization platforms like VirtualBox don’t support VMX files directly.

Can I transfer a VMX file between different versions of VMware?

While VMX files are transferable between VMware products, you may need to update the virtualHW.version parameter in the VMX file to match the target VMware version. Some newer VMX file features might not be compatible with older VMware versions, requiring manual adjustments.

What happens if my VMX file becomes corrupted?

If a VMX file becomes corrupted, you can restore it from a backup, create a new VMX file with identical settings, or use VMware’s repair tools to regenerate the VMX file based on existing virtual machine data. It’s recommended to keep backups of your VMX files separately from your virtual machines.

Are there security implications when sharing VMX files?

VMX files can contain sensitive information like network configurations, shared folder paths, and custom settings. Before sharing VMX files, review and remove any sensitive data. It’s recommended to create a clean VMX file specifically for distribution purposes.

Can I use VMX files to clone virtual machines?

VMX files play a crucial role in cloning virtual machines. By copying both the VMX file and associated disk files (VMDK), you can create exact duplicates of virtual machines. However, you’ll need to modify certain parameters in the cloned VMX file, such as the displayName and UUID, to avoid conflicts.

Related articles

You may find these related articles of interest to you:

Got a question? Post it on our VMware Forums!