WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud
  • Tanzu
    • Application Modernization
    • Tanzu services
    • Tanzu Community Edition
    • Tanzu Kubernetes Grid
    • vSphere with Tanzu
  • Home Lab
  • Nested Virtualization
  • 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. Duncan says

    02/19/2013 at 5:28 pm

    Nice one!

    Reply
  2. Divnull 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. 7b689224-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

Thanks for the comment! Cancel reply

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

Search

Author

William Lam is a Senior Staff Solution Architect working in the VMware Cloud team within the Cloud Infrastructure Business Group (CIBG) at VMware. He focuses on Cloud Native technologies, Automation, Integration and Operation for the VMware Cloud based Software Defined Datacenters (SDDC)

Connect

  • Email
  • GitHub
  • LinkedIn
  • RSS
  • Twitter
  • Vimeo

Recent

  • How to disable the Efficiency Cores (E-cores) on an Intel NUC? 03/24/2023
  • Changing the default HTTP(s) Reverse Proxy Ports on ESXi 8.0 03/22/2023
  • NFS Multi-Connections in vSphere 8.0 Update 1 03/20/2023
  • Quick Tip - How to download ESXi ISO image for all releases including patch updates? 03/15/2023
  • SSD with multiple NVMe namespaces for VMware Homelab 03/14/2023

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 © 2023