WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Why Are There Two VMX Files?

Why Are There Two VMX Files?

02.19.2013 by William Lam // 4 Comments

Have you noticed that for a powered on virtual machine in vSphere 5.1, there is now an additional VMX file that ends with an ~ (tilde) found within the virtual machine's configuration directory?

This was an observation that was made by a few folks and some thought it might be related to a virtual machine's lock file which is created when a virtual machine is powered on. After a bit of research, it turns out this extra VMX file is not a lock file but actually an "edit file". This edit file is a copy of the original VMX file and when changes are required, they are applied to the edit file first. Once the changes are complete, the edit file is then atomically swapped with the original VMX file which helps prevent potential VMX file corruption. In the worst case event where the original VMX file is somehow corrupted, the virtual machine can be restored using the edit file.

This is another reason why you should not be manually editing a virtual machine's VMX file, especially when it is still powered on. For any VMX configuration changes, you should be automating using the vSphere API through the use of either PowerCLI or the vSphere SDK for Perl. For more information on automating advanced settings across your virtual machines, please take a look at this article.

More from my site

  • Configuring a "Whitelist" for VM advanced settings in vCloud Director
  • A kitten is also harmed, every time you edit a VMX file by hand
  • How to change hardware serial number for Mac OS X Guest?
  • A Hidden vSphere 5.1 Gem - Forwarding Virtual Machine Logs (vmware.log) to Syslog Part 2
  • A Hidden vSphere 5.1 Gem - Forwarding Virtual Machine Logs (vmware.log) to Syslog Part 1

Categories // Uncategorized Tags // vmx

Comments

  1. *protectedDuncan says

    02/19/2013 at 5:28 pm

    Nice one!

    Reply
  2. *protectedDivnull says

    03/11/2013 at 10:24 am

    Hi William
    Yet another interesting article on your blog. Thanks for sharing.
    Maybe you could point out that the duplicate vmx~ only exists while a VM is in powered on state.
    You say we should not manually edit VMX Files. True, if you don't have a backup of it. But who (except for Chuck Norris) is editing VMX files manually during runtime anyway? 😉

    Reply
  3. *protected7b689224-2f65-11e3-be9b-000bcdcb5194 says

    10/07/2013 at 3:31 pm

    Freudian slip? Is it atomically swapped or automatically?

    Reply

Trackbacks

  1. Virtual Machine Files and Definitions | IT Diversified says:
    04/22/2014 at 5:46 pm

    […] VMX~ – Change file for original VMX file. Changes are made to the VMX~ first to avoid VMX file corruption (Credit: William Lam) […]

    Reply

Leave a Reply to DivnullCancel reply

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

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025