VMware Communities > VMTN > VMware Infrastructure™ > VI: ESX 3.5 > Discussions

This Question is Answered

1 "correct" answer available (10 pts) 1 "helpful" answer available (6 pts)
13 Replies Last post: May 5, 2008 7:09 PM by ntmtvtd
Reply

Looking for detailed information on VM files

Sep 22, 2007 2:55 PM

Click to view esiebert7625's profile Guru esiebert7625 6,790 posts since
Oct 23, 2006
Moderator
I'm looking for any detailed information on the below files that are created with the VM. I already know basically what they are I'm just looking for more information about them. Thanks

*.vmxf file – VM Team information will be stored in this file

*.vmsd file – File to store metadata and information about snapshots

*.vmsn file - Created with snapshots, this file can be large or small based on if you snapshot the VM's memory

Also on the .vmss file, I know this is the suspend file created to save the VM's state. Why is this file not deleted automatically when the VM is powered back on? In my testing it is not deleted until you actually power off the VM and power it back on after it is brought out of the suspend state.
Reply Re: Looking for detailed information on VM files Apr 6, 2007 10:30 AM
Click to view Abaronov's profile Hot Shot Abaronov 91 posts since
Oct 13, 2006
This link might help:

http://www.vmware.com/support/ws5/doc/ws_learning_files_in_a_vm.html

What do you mean by 'detailed information'?
Are you looking for the file format?

Thanks,
Andrei
Reply Re: Looking for detailed information on VM files Apr 6, 2007 10:44 AM
in response to: Abaronov
Click to view esiebert7625's profile Guru esiebert7625 6,790 posts since
Oct 23, 2006
Moderator
Thanks for that link, I forgot about that one. Basically what kind of information is stored in the files and how they are used.

Like the vmxf file, I know it is where the VM Team information will be stored but what type of info is stored in it? Are teams even used in ESX, I thought this was a workstation feature? If so why does the file appear for ESX Vm's.
Reply Re: Looking for detailed information on VM files Apr 6, 2007 10:47 AM
Click to view JonT's profile Hot Shot JonT 174 posts since
Feb 23, 2006
The .vmss file will be kept until the VM sucessfully comes out of the supspended state. That way if for some reason it gets powered back off before fully shutting down, it will still be able to resume from the "suspended" state.

I had an older issue with MS Virtual Server where I would shutdown a VM and it would automatically go into a suspended state but that was a different issue from what you are asking.
Reply Re: Looking for detailed information on VM files Apr 9, 2007 11:27 AM
Click to view esiebert7625's profile Guru esiebert7625 6,790 posts since
Oct 23, 2006
Moderator
If anyone is interested, I've researched this pretty thoroughly and put together this....

What are all the files that are located in my virtual machines directory on the ESX server for?

*.nvram file – This file contains the CMOS/BIOS for the VM. The BIOS is based off the PhoenixBIOS 4.0 Release 6 and is one of the most successful and widely used BIOS and is compliant with all the major standards, including USB, PCI, ACPI, 1394, WfM and PC2001. If the NVRAM file is deleted or missing it will automatically be re-created when the VM is powered on. Any changes made to the BIOS via the Setup program (F2 at boot) will be saved in this file. This file is usually less then 10K in size and is not in a text format (binary).

vmdk files – These are the disk files that are created for each virtual hard drive in your VM. There are 3 different types of files that use the vmdk extension, they are:

*–flat.vmdk file - This is the actual raw disk file that is created for each virtual hard drive. Almost all of a .vmdk file's content is the virtual machine's data, with a small portion allotted to virtual machine overhead. This file will be roughly the same size as your virtual hard drive.

*.vmdk file – This isn't the file containing the raw data anymore. Instead it is the disk descriptor file which describes the size and geometry of the virtual disk file. This file is in text format and contains the name of the –flat.vmdk file for which it is associated with and also the hard drive adapter type, drive sectors, heads and cylinders, etc. One of these files will exist for each virtual hard drive that is assigned to your virtual machine. You can tell which –flat.vmdk file it is associated with by opening the file and looking at the Extent Description field.

*–delta.vmdk file - This is the differential file created when you take a snapshot of a VM (also known as REDO log). When you snapshot a VM it stops writing to the base vmdk and starts writing changes to the snapshot delta file. The snapshot delta will initially be small and then start growing as changes are made to the base vmdk file, The delta file is a bitmap of the changes to the base vmdk thus is can never grow larger than the base vmdk. A delta file will be created for each snapshot that you create for a VM. These files are automatically deleted when the snapshot is deleted or reverted in snapshot manager.

*.vmx file – This file is the primary configuration file for a virtual machine. When you create a new virtual machine and configure the hardware settings for it that information is stored in this file. This file is in text format and contains entries for the hard disk, network adapters, memory, CPU, ports, power options, etc. You can either edit these files directly if you know what to add or use the Vmware GUI (Edit Settings on the VM) which will automatically update the file.

*.vswp file – This is the VM swap file (earlier ESX versions had a per host swap file) and is created to allow for memory overcommitment on a ESX server. The file is created when a VM is powered on and deleted when it is powered off. By default when you create a VM the memory reservation is set to zero, meaning no memory is reserved for the VM and it can potentially be 100% overcommitted. As a result of this a vswp file is created equal to the amount of memory that the VM is assigned minus the memory reservation that is configured for the VM. So a VM that is configured with 2GB of memory will create a 2GB vswp file when it is powered on, if you set a memory reservation for 1GB, then it will only create a 1GB vswp file. If you specify a 2GB reservation then it creates a 0 byte file that it does not use. When you do specify a memory reservation then physical RAM from the host will be reserved for the VM and not usable by any other VM’s on that host. A VM will not use it vswp file as long as physical RAM is available on the host. Once all physical RAM is used on the host by all its VM’s and it becomes overcommitted then VM’s start to use their vswp files instead of physical memory. Since the vswp file is a disk file it will effect the performance of the VM when this happens. If you specify a reservation and the host does not have enough physical RAM when the VM is powered on then the VM will not start.

*.vmss file – This file is created when a VM is put into Suspend (pause) mode and is used to save the suspend state. It is basically a copy of the VM’s RAM and will be a few megabytes larger than the maximum RAM memory allocated to the VM. If you delete this file while the VM is in a suspend state It will start the VM from a normal boot up instead of starting the vm from the state it was when it was suspended. This file is not automatically deleted when the VM is brought out of Suspend mode. Like the Vswp file this file will only be deleted when the VM is powered off (not rebooted). If a Vmss file exists from a previous suspend and the VM is suspended again then the previous file is re-used for the subsequent suspensions. Also note that if a vswp file is present it is deleted when a VM is suspended and then re-created when the VM is powered on again. The reason for this is that the VM is essentially powered off in the suspend state, it’s RAM contents are just preserved in the vmss file so it can be quickly powered back on.

*.log file – This is the file that keeps a log of the virtual machine activity and is useful in troubleshooting virtual machine problems. Every time a VM is powered off and then back on a new log file is created. The current log file for the VM is always vmware.log. The older log files are incremented with a -# in the filename and up to 6 of them will be retained. (ie. vmware-4.log) The older .log files are always deleteable at will, the latest .log file can be deleted when the VM is powered off. As the log files do not take much disk space, most administrators let them be

*.vmxf file – This is a supplemental configuration file in text format for virtual machines that are in a team. Note that the .vmxf file remains if a virtual machine is removed from the team. Teaming virtual machines is a Vmware Workstation feature and includes the ability to designate multiple virtual machines as a team, which administrators can then power on and off, suspend and resume as a single object — making it particularly useful for testing client-server environments. This file still exists with ESX server virtual machines but only for compatibility purposes with Workstation.

*.vmsd file – This file is used to store metadata and information about snapshots. This file is in text format and will contain information such as the snapshot display name, uid, disk file name, etc. It is initially a 0 byte file until you create your first snapshot of a VM and from that point it will populate the file and continue to update it whenever new snapshots are taken. This file does not cleanup completely after snapshots are taken. Once you delete a snapshot it will still leave the fields in the file for each snapshot and just increment the uid and set the name to “Consolidate Helper” presumably to be used with Consolidated Backups

*.vmsn file - This is the snapshot state file, which stores the exact running state of a virtual machine at the time you take that snapshot. This file will either be small or large depending on if you select to preserve the VM’s memory as part of the snapshot. If you do choose to preserve the VM’s memory then this file will be a view megabytes larger then the maximum RAM memory allocated to the VM. This file is similar to the vmss (Suspend) file. A vmsn file will be created for each snapshot taken on the VM, these files are automatically deleted when the snapshot is removed.
Reply Re: Looking for detailed information on VM files Sep 20, 2007 7:40 AM
in response to: esiebert7625
Click to view deepu_cherian@ml.com's profile Novice deepu_cherian@ml.com 12 posts since
Nov 8, 2004
Eric,

That was a very useful message. Thanks for your effort in putting this together.
Reply Re: Looking for detailed information on VM files Sep 20, 2007 8:48 AM
in response to: deepu_cherian@ml.com
Click to view esiebert7625's profile Guru esiebert7625 6,790 posts since
Oct 23, 2006
Moderator
No problem, I also have it available on my website....

http://vmware-land.com/Vmware_Tips.html#VM5
Reply Re: Looking for detailed information on VM files Apr 24, 2008 7:51 PM
Click to view ntmtvtd's profile Novice ntmtvtd 11 posts since
Mar 7, 2008
So if the *-flat.vmdk files is roughly the same space as your virtual hard drive, does that mean it takes up double the space?
Reply Re: Looking for detailed information on VM files Apr 24, 2008 9:53 PM
in response to: ntmtvtd
Click to view Rumple's profile Master Rumple 1,245 posts since
Jan 6, 2005
the flat.vmdk file IS you disk file...
Reply Re: Looking for detailed information on VM files Apr 25, 2008 12:59 PM
in response to: Rumple
Click to view ntmtvtd's profile Novice ntmtvtd 11 posts since
Mar 7, 2008
when i browse the datastore, it shows values for both files. it confuses me in that it leads me to believe that more space is being used up on the SAN than necessary.
Reply Re: Looking for detailed information on VM files Apr 30, 2008 8:33 AM
Click to view mikeVM's profile Lurker mikeVM 1 posts since
Apr 30, 2008
I'm new to the ESX environment and have run into a problem starting a guest. I'm getting 'insufficient disk space in datastore'. When I browse the datastore, I see several vmdk files of the guest, plus a vmware-vmz-zdump.0 file along with some snapshots and logs. I deleted the snapshots and logs and am looking to purge anything else that I can in order to free up space so I can start the guest. Should I purge the zdump file and any of the vmdk's?
Reply Re: Looking for detailed information on VM files Apr 30, 2008 10:28 AM
in response to: ntmtvtd
Click to view wila's profile Virtuoso wila 3,207 posts since
Jun 27, 2006
It's a known bug, the databrowser mistakenly shows the metadata file (the file without -flat) as if it has the same size as what it declares internally in the meta data.

FWIW, it seems to be fixed if you are on 3.5 as it doesn't show the -flat file anymore as a separate file. A bit of a funky fix, but at least it doesn't confuse users anymore.

--
Wil
Reply Re: Looking for detailed information on VM files Apr 30, 2008 6:44 PM
in response to: mikeVM
Click to view Ken.Cline's profile Champion Ken.Cline 5,145 posts since
Jul 7, 2004
VMware Moderator
mikeVM wrote:
I'm new to the ESX environment and have run into a problem starting a guest. I'm getting 'insufficient disk space in datastore'. When I browse the datastore, I see several vmdk files of the guest, plus a vmware-vmz-zdump.0 file along with some snapshots and logs. I deleted the snapshots and logs and am looking to purge anything else that I can in order to free up space so I can start the guest. Should I purge the zdump file and any of the vmdk's?

You can trash the zdump file (it's vmware-vmx-zdump.0) - it's related to a failed attempt to remove a snapshot, and since you've already deleted the snapshot files, no harm in deleting the zdump, either. If you want to keep your VMs, then DO NOT delete the .vmdk files - those are your virtual machine's disk drives. If you delete them, you're effectively deleting the guts of your VM (the .vmx file contains the metadata that describes the VM - without the .vmdk files (which are still referenced in the .vmx), the VM will not power on).

Ken Cline
Technical Director, Virtualization
Wells Landers
VMware Communities User Moderator
Reply Re: Looking for detailed information on VM files May 5, 2008 7:09 PM
in response to: wila
Click to view ntmtvtd's profile Novice ntmtvtd 11 posts since
Mar 7, 2008
Thanks for clearing that up wila :D
Actions