Specifications
CHAPTER 6 Using Disks in a Virtual Machine
167
You can choose the location where the redo-log and snapshot files are stored. By
default, the files are stored in the same directory as the virtual disk (.vmdk) file.
By default, redo-log files for physical disks are located in the same directory as the
virtual machine configuration file (.vmx).
You can change the location of the redo-log and snapshot files in the virtual machine
settings editor. With the virtual machine powered off, choose VM > Settings. Click the
Options tab, select General, then under Working directory, type in or browse to the
folder in which the redo log or snapshot should be stored.
You may choose to locate these files in a different directory to increase available space
or improve performance. For best performance, the log files for a virtual machine
should be on a local hard drive on the host computer.
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 GSX Server 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.
There is a way to work around the lock file so that multiple virtual machines can
access it — by using SCSI reservation. This is typically done in conjunction with a high-
availability configuration, such as clustering. For more information about this, see
High-Availability Configurations with VMware GSX Server in the VMware GSX Server
Administration Guide.
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.