[an error occurred while processing this directive]
VMware Workstation Disk Types and Disk Modes VMware Workstation allows users to flexibly configure the disks used by a virtual machine. Users can choose a type and a mode for each disk. There are three types and three modes. Each type can be configured with any one of the three modes and vice versa.
A plain disk is like a virtual disk, but it can be larger than 2GB. It is composed of several files, called extents. Each extent is limited to 2GB in length. Unlike a virtual disk, when a plain disk is created, all the disk space defined for the extents is allocated and filled with zeros. A raw disk directly accesses an existing local disk or partition. Raw disks can be used to allow VMware Workstation to run one or more guest operating systems from existing disk partitions. Raw disks may be set up on both IDE and SCSI devices. At this time, however, booting from an operating system already set up on an existing SCSI disk or partition is experimental. Additional information on using raw disk partitions can be found on the VMware Web site:
Disk modes determine how changes are saved to the disk. Raw, virtual and plain disks can use any available mode. For example, a user could have an undoable raw disk, an undoable virtual disk, or an undoable plain disk.
Persistent
VMware Workstation only reads the disk. Any writes to the disk during the session are actually written to a redo log file that is deleted at the end of the session when you power off or reset the virtual machine. During the VMware Workstation session any blocks that have been modified and written to the redo log file are read from the redo log file instead of the disk. At the end of the VMware Workstation session the redo log file is discarded. The guest operating system is entirely unaware that the disk is nonpersistent. Normal guest operating system file buffering works on top of this mechanism, providing efficient buffered I/O. Some disk operations may even be faster to a VMware Workstation nonpersistent disk than to an actual disk. The redo log file is placed in the same directory as the disk file by default. However, the location of the redo log file can be changed in the Configuration Editor under Misc.
While the VMware Workstation session is running, disk blocks that have been modified and written to the redo log are read from there instead of the disk. Any disk type can be used in undoable mode. When you power off a VMware Workstation session with an undoable disk, you are given the option of either:
If you choose to keep the redo log, you are prompted again (fig 3.) when you power on the next VMware Workstation session to see if you want to commit the redo log changes from the previous session, discard the redo log, continue appending changes to the redo log, or cancel the power on.
The guest operating system is entirely unaware that the disk is undoable. Normal guest operating system file buffering works on top of the redo log mechanism, providing efficient buffered I/O. Some disk operations, including file system creation, repair, and other operations may be faster on a VMware Workstation undoable disk than on an actual disk. The redo log file is placed in the same directory as the disk file by default. However, the location of the redo log file can be changed in the Configuration Editor under Misc.
Plain disks have a .pln extension, and the extents of the plain disk have a .dat extension. Log files are used to save blocks that the virtual machine modifies during a session. The log file for a nonpersistent disk is not saved at the end of a session, while the log file for an undoable disk is saved. As described above, the log file for undoable disks is called the redo log, and the user is able to decide whether the log file should be saved or not. The log file for a virtual disk called filename is called filename.dsk.REDO and is created by default in the same directory as the .dsk file. In the case of plain disks, filename.pln.REDO is created by default in the same directory as the .pln file. By default, log files for raw disks are located in the same directory as the virtual machine configuration file. Using the Configuration Editor, you can change the log file for nonpersistent and undoable disks using the Advanced button and specifying a different VMware Workstation Redo Log Directory. You may choose to locate the log files in a different directory to increase available space. For best performance, the log files for a virtual machine should be local to the machine running the virtual machine.
Lock files are always created in the same directory as the .dsk or .pln file. There are two types of lock files: reader and writer. A nonpersistent disk will be protected by reader lock files, while persistent and undoable disks 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. The extents of a plain disk are individually locked, using the same method. A virtual machine will remove lock files it created when the virtual machine is powered off. If it cannot remove the lock, a stale lock file will be left protecting the .dsk or .pln file. For example, if the machine crashes before the virtual machine has a chance to remove its lock file, there will be a stale lock. If a stale lock file remains when the virtual machine is started again, the virtual machine will try 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:
Raw disk partitions are also protected by locks. However, if the host operating system is installed on the same raw disk that the virtual machine is using, the locks are ignored. VMware strongly recommends that the raw disk for the virtual machine not be installed on the same raw disk as the host operating system for this reason. |