VMware GSX Server 2.5.2Features | Documentation | Knowledge Base | Discussion Forums When you are creating a new virtual machine, you can choose to use an existing virtual disk (on a Windows host, you must select the custom path when creating the virtual machine). The Configuration Editor (Settings > Configuration Editor) allows you to choose different disk files for a virtual machine. You may need to do this if you moved the 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 disk the operating system, the program files and the data files. The virtual disk files have a .vmdk extension. A virtual disk comprises one or more .vmdk files. The larger the size of the virtual disk, the more .vmdk files. As data is added to a virtual disk, the .vmdk files grow in size, to a maximum of 2GB each. Almost all of a .vmdk file's content is the virtual machine's data, with a small portion allotted to virtual machine overhead. If the virtual disk needs 2GB or more disk space, the Configuration Editor shows the name of the first file in the set of files used to store the virtual disk. The other files used for that disk are automatically given names based on the first file's name. For example, a Windows 2000 virtual machine that needed two files to store its virtual disk would, by default, store it in files named Windows 2000.vmdk and Windows 2000-02.vmdk. Note: If you choose to allocate the space for a virtual disk when you create it, the virtual disk files have a special format. The file that stores information about the virtual disk has a .pln extension and the files used to store the virtual disk's data have a .dat extension. If your virtual machine is on a Windows host and uses disk files created under earlier VMware products, with a .dsk extension, they can be updated to use the new extension. For details, see Updating Filenames for Virtual Disks Created with Earlier VMware Products. If you are using a raw disk, a file with the extension .raw stores information about the physical disk or partition used by the virtual machine. Redo-log files save blocks that the virtual machine modifies while it is running. The redo-log file for a disk in nonpersistent mode is not saved when the virtual machine is powered off or reset, while the redo-log file for a disk in undoable mode is saved. The redo-log file for disks in undoable mode is called the redo log, and the user decides whether the redo-log file should be saved or not. The redo-log file for a virtual disk called vm is called vm.vmdk.REDO. If the virtual disk is larger than 2GB, it is divided into sets of 2GB disk files named vm.vmdk, vm-02.vmdk, vm-03.vmdk and so on; its redo-log files are called vm.vmdk.REDO, vm-02.vmdk.REDO, vm-03.vmdk.REDO and so on. You can choose the location where these redo logs are stored. By default, the redo logs for disks in undoable mode are stored in the same directory as the virtual disk (.vmdk) file. Redo logs for disks in nonpersistent mode are stored in your host's temp directory by default. In the case of plain disks, filename.pln.REDO is created by default in the same directory as the .pln file. By default, redo-log files for raw disks are located in the same directory as the virtual machine configuration file. You can change the location of the log file for disks in nonpersistent and undoable modes in the Configuration Editor. On a Windows host, click the Options tab, then type in or browse to the folder in which the redo log should be stored. On a Linux host, click Misc on the left side of the Configuration Editor, then type in or choose the directory in which the redo log should be stored. You may choose to locate the redo-log 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. 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 users to lose data. Lock files are always created in the same folder (directory) as the .vmdk or .pln file. There are two types of lock files reader and writer. A disk in nonpersistent mode is protected by reader lock files, while disks in persistent and undoable modes use writer lock files. A disk protected by a writer lock file can be accessed by only one virtual machine. A disk that has reader lock files can be read by more than one virtual machine but cannot be written to. 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 Using SCSI Reservation to Share SCSI Disks With Virtual Machines. The data storage files of a plain disk are individually locked, using the same method. Note: 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. When a virtual machine is powered off, it removes lock files it created. If it cannot remove the lock, a stale lock file is left protecting the .vmdk or .pln file. For example, if the host machine crashes before the virtual machine has a chance to remove its lock file, there is a stale lock. 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:
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 explaining what you can do about the lock. 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. |