Contents
Previous Next
File Locations
Disk Files
The Virtual Machine Settings editor (
VM > Settings) allows you to choose the disk files for a virtual machine. See
What Files Make Up a Virtual Machine? for a comprehensive list of the other files.
You may want to choose a file other than the one created by the New Virtual Machine Wizard if you are using a virtual disk that you created in a different location or if you are moving the automatically created disk files to a new location.
The disk files for a virtual disk store the information that you write to a virtual machine's hard diskthe operating system, the program files and the data files. The virtual disk files have a .vmdk extension.
A virtual disk is made up of one or more .vmdk files.
On Windows hosts, each virtual disk is contained in one file by default. You may, as an option, configure the virtual disk to use a set of files limited to 2GB per file. Use this option if you plan to move the virtual disk to a file system that does not support files larger than 2GB.
You must set this option at the time the virtual disk is created.
If you are setting up a new virtual machine, in the New Virtual Machine Wizard follow the Custom path. In the screen that allows you to specify the virtual disk's capacity, select Split disk into 2GB files.
If you are adding a virtual disk to an existing virtual machine, follow the steps in the Add Hardware Wizard. In the screen that allows you to specify the virtual disk's capacity, select Split disk into 2GB files.
When a disk is split into multiple files, larger virtual disks have more .vmdk files.
The first .vmdk file for each disk is small and contains pointers to the other files that make up the virtual disk. The other .vmdk files contain data stored by your virtual machine and use a small amount of space for virtual machine overhead.
If you chose to allocate space for the virtual disk in advance, the file sizes are fixed, and most of the files are 2GB. As mentioned above, the first file is small. The last file in the series may also be smaller than 2GB.
If you did not allocate the space in advance, the .vmdk files grow as data is added, to a maximum of 2GB eachexcept for the first file in the set, which remains small.
The Virtual Machine Settings editor shows the name of the first file in the setthe one that contains pointers to the other files in the set. The other files used for that disk are automatically given names based on the first file's name.
For example, a Windows XP Professional virtual machine using the default configuration, with files that grow as needed, stores the disk in files named Windows XP Professional.vmdk, Windows XP Professional-s001.vmdk, Windows XP Professional-s002.vmdk and so on.
If the disk space is allocated in advance, the names are similar, except that they include an f instead of an sfor example, Windows XP Professional-f001.vmdk.
If you are using a raw disk, the .vmdk file stores information about the physical disk or partition used by the virtual machine.
Lock Files
A running virtual machine creates lock files to prevent consistency problems on virtual disks. If the virtual machine did not use locks, multiple virtual machines might read and write to the disk, causing data corruption.
Lock files are always created in the same directory as the .vmdk file.
The locking methods used by VMware Workstation on Windows and Linux hosts are different, so files shared between them are not fully protected. If you use a common file repository that provides files to users on both Windows and Linux hosts, be sure that each virtual machine is run by only one user at a time.
When a virtual machine is powered off, it removes the lock files it created. If it cannot remove the lock, a stale lock file is left protecting the .vmdk file. For example, if the host machine crashes before the virtual machine has a chance to remove its lock file, a stale lock remains.
If a stale lock file remains when the virtual machine is started again, the virtual machine tries to remove the stale lock. To make sure that no virtual machine could be using the lock file, the virtual machine checks the lock file to see if
1. The lock was created on the same host where the virtual machine is running.
2. The process that created the lock is not running.
If those two conditions are true, the virtual machine can safely remove the stale lock. If either of those conditions is not true, a dialog box appears, warning you that the virtual machine cannot be powered on. If you are sure it is safe to do so, you may delete the lock files manually. On Windows hosts, the filenames of the lock files end in .lck. On Linux hosts, the filenames of the lock files end in .WRITELOCK.
Raw disk partitions are also protected by locks. However, the host operating system is not aware of this locking convention and thus does not respect it. For this reason, VMware strongly recommends that the raw disk for a virtual machine not be installed on the same physical disk as the host operating system.