Saturday, 24 April 2010

VMWare Server Temporary Files That are Safe to Remove

I have a laptop that runs Windows Vista Home Ultimate. This version is like Windows XP Home Edition and does not allow installation of any servers like IIS, Virtual PC, SQL Server, etc. that I need for my development. I am using VMWare Server to run Windows XP as my primary development environment. Also I have another Windows XP VMWare image that is used for deployment testing. Both of them are located on 80GB logical partition. Each virtual machine has two 20GB expandable drives, but at the moment only 20GB used by each machine. Looks like I had plenty of room to run both virtual machines. I was surprised to see one day that I was not able to pause a machine because there was no any space left on the disk. I shut down virtual machine and had a look at VMWare files. Each Virtual Machine had several copies of *.vmem and *.vmsn files in the directory. These files are used to store paging memory files and created when Virtual Machine is running. Looks like they were left when VMWare Server crashed a couple of times. To clean up the mess I had to remove the following files:

  • .VMEM – VMWare Server paging memory file. It will only appear if the virtual machine is running and will be left it if it has crashed.
  • .LOG – Log files that keep a record of VMWare Server activity
  • .NVRAM file
  • .VMSD - This is a centralized file for storing information and metadata about snapshots

Also I found a couple of snapshot files are no longer used. The following files can be removed:

  • .VMSN - This is the snapshot state file, which stores the running state of a virtual machine at the time you take that snapshot
  • .LCK – indicating that certain files are locked

Once I removed these files disk had nearly 50GB of free disk space.

Don’t Remove:

  • .VMX - This is the primary configuration file, which stores settings chosen in the New Virtual Machine Wizard or virtual machine settings editor.
  • .VMDK or .#.VMDK - this is a virtual disk file, which stores the contents of the virtual machine's hard disk drive.

References:

What Files Make Up a Virtual Machine?

Cleaning Up After Incomplete Uninstallation on a Windows Host

Building a VMware Shared Disk

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

4 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. That just save me 25gb - per VM! (I keep several copies) Thanks

    ReplyDelete
  3. You can also delete files like

    vmware-vmx-12345.dmp

    also

    *.vmss {these are often ~300mb each}

    ReplyDelete
  4. I moved my .vmem folders to test this out, and was asked to browse for ssnapshotxxx.vmem when I started my VM up again. Glad I kept them instead of just deleting them, as this article suggests it's safe to do.

    ReplyDelete