VMware Workstation Player course
Virtual Disks in VMware Workstation Player Explained
Learn how VMware Workstation Player virtual disks and VMDK files work, how growable and preallocated storage differ, and how to manage or move virtual disks safely.
A virtual disk is a software representation of a disk drive. VMware Workstation Player stores the disk's data as files on the host system—the physical computer and operating system running VMware—and presents that data to the guest operating system as a normal disk drive.
Inside the virtual machine, Windows or Linux normally sees a disk that can contain an operating system, installed applications, user files, partitions, and other persistent data. On the host, however, that same disk may appear as one file or as a group of related files in the virtual machine's folder.
Virtual Disk Concepts
| Item | Seen By | Purpose |
|---|---|---|
| Virtual disk drive | Guest operating system | Acts like a hard drive for the guest operating system, applications, and files. |
| VMDK file or files | Host system and VMware Workstation Player | Stores the contents and structural information for the virtual disk. |
| VM folder | Host filesystem | Contains the virtual machine configuration and commonly its disk backing files. |
| Guest filesystem | Guest operating system | Organizes files inside the virtual disk, such as a Windows NTFS volume or a Linux filesystem. |
What Is a VMDK File?
VMDK is VMware's virtual disk format. Files using the .vmdk filename extension contain, or describe how to access, the data that VMware presents as a virtual hard disk.
A virtual disk can be represented by a single VMDK file or by multiple related files. The exact layout depends on how the disk was created and how its storage is organized. Do not assume that every file associated with a disk is independently usable.
The virtual machine configuration defines which virtual hardware is attached to the VM, including which VMDK is used as a disk. The VMDK stores the disk contents. In simplified form:
VM configuration --attaches--> virtual disk device
|
v
VMDK file or files
stored on the host
Changing the VM configuration can attach or detach a disk, but that action does not automatically change the contents of the disk. Conversely, moving or deleting VMDK files on the host can prevent the VM from locating its disk.
What a Newly Created VM Normally Contains
The New Virtual Machine workflow normally creates a virtual machine with one virtual disk. That first disk usually contains the guest operating system. It can also contain installed programs, user documents, temporary data, and other files, just as a physical computer's system drive can.
During creation, you choose the disk's capacity. Capacity is the maximum size configured for the virtual disk—the largest disk size that the guest can use after the disk is prepared by the guest operating system. It is not necessarily the amount of space immediately consumed on the host.
For example, a newly created 60 GB virtual disk can have a 60 GB maximum capacity while initially occupying much less than 60 GB of host storage if it uses growable storage. The guest still treats the configured disk as a disk with up to 60 GB of capacity.
Growable and Preallocated Virtual Disks
A growable disk starts with backing files that use less host storage than the configured maximum. As the guest writes data, VMware expands the backing storage, up to the disk's configured capacity. This is also commonly called dynamically allocated or expanding storage.
A preallocated disk reserves the configured storage capacity on the host when the disk is created. A 60 GB preallocated disk therefore requires approximately that amount of available host storage at creation time, subject to filesystem and VMware overhead.
| Characteristic | Growable Disk | Preallocated Disk |
|---|---|---|
| Initial host storage consumption | Usually less than the configured capacity. | Approximately the configured capacity is reserved at creation. |
| Maximum virtual capacity | The configured capacity, such as 60 GB. | The configured capacity, such as 60 GB. |
| When host storage is consumed | As data is written by the guest, the backing storage expands. | At disk creation time. |
| Host free-space planning | The host needs enough space for future growth, not just today's usage. | The host needs enough space before creation and must retain sufficient free space for the VM and other files. |
| Typical use case | General-purpose VMs where conserving unused host space initially is useful. | Situations where predictable reserved storage or consistent allocation behavior is preferred. |
Allocation affects how host storage is reserved and consumed; it does not change the disk's intended maximum capacity from the guest's perspective. A growable 60 GB disk and a preallocated 60 GB disk are both configured to provide up to 60 GB to the guest.
Choosing an Allocation Method
- Choose growable storage when the VM will begin small and you want host space to be consumed as needed.
- Choose preallocated storage when you can reserve the full capacity and want host-space usage to be more predictable.
- For either choice, account for the guest operating system, applications, snapshots or other VM files, and free space required by the host operating system.
Creation time can also differ. A growable disk generally takes less time to create initially, while a preallocated disk may take longer because the host must reserve or prepare the full capacity.
Managing Virtual Disks in Workstation Player
Virtual disks are part of a VM's virtual hardware. With the VM powered off, open the virtual machine's settings and review the attached disk device. The settings interface can be used to perform supported hardware-management tasks.
Adding a Disk
You can add an additional virtual disk drive to a VM. A second disk is useful for separating data from the guest operating system disk, testing storage layouts, or assigning a dedicated area to applications and user files.
The usual workflow is to open the VM settings, choose the option to add hardware, select a virtual hard disk, and create a new disk or select an existing one. After the disk is attached, the guest operating system may still need to initialize it, create a partition, and format it before it can be used for ordinary files.
For detailed procedures, see Adding a New Virtual Hard Disk and Adding an Existing Virtual Hard Disk.
Removing or Detaching a Disk
A disk can be removed from the VM's hardware configuration. This normally means the VM no longer presents that disk to the guest. It does not necessarily mean that the VMDK backing files have been deleted from the host.
See Removing a Virtual Hard Disk for the disk-removal topic. When changing existing disk settings, make changes through the VM's hardware settings while the VM is powered off, and verify the result before starting the guest.
Locating Virtual Disk Files on the Host
Virtual disk files are typically stored in the virtual machine's folder on the host filesystem. The folder may also contain the VM configuration, logs, saved-state data, and other supporting files.
- Power off the guest operating system and then close or suspend VMware Workstation Player as appropriate.
- Find the VM's folder in the host file manager.
- Look for filenames ending in
.vmdk. A disk may have one VMDK or several related files. - Use the VM settings to confirm which disk is attached before changing anything in the folder.
Inspecting the folder can help identify the disk backing files, but the host filename alone is not a complete inventory of the guest's partitions or files. The guest filesystem is inside the virtual disk and must be examined from the guest or with suitable disk-management tools.
Moving a VM or Virtual Disk
File-based virtual disks are portable because their data resides in the host filesystem rather than being tied directly to a particular physical disk device. You can move a VM folder to another folder on the same host or transfer it to another computer.
For a complete VM move, keep the VM configuration and all required VMDK files together. If the disk is moved separately, use the VM's hardware settings to reconnect it to the correct VMDK while the VM is powered off. A missing related file or an unchanged path can cause VMware to report that the disk cannot be found.
The destination system must have enough free storage for the VM. It also needs compatible VMware Workstation Player software and access permissions for the copied files. After the move, verify the disk path in the VM settings before powering on the guest.
Moving a VM is not the same as creating a backup. A move can leave the original files unavailable or create only one copy. For recovery, maintain a separate, verified backup of the VM and its disks.
Practical Examples
A Newly Created Windows VM
A standard Windows VM begins with one virtual disk. Windows sees a normal disk on which it can install the operating system. Applications and user files can use the same disk. On the host, the disk data is stored in VMDK file or files inside the VM folder.
Choosing Storage for a 60 GB Disk
With a growable 60 GB disk, the host may initially use only a small amount of storage. As Windows, applications, updates, and user files add data, the VMDK backing storage grows. With a preallocated 60 GB disk, roughly the full configured capacity is reserved when the disk is created. In both cases, the guest's maximum virtual capacity is 60 GB.
Adding a Separate Data Disk
Attach a second virtual disk through the VM's settings. The guest will see another disk device, but it may show as unused until the guest initializes, partitions, and formats it. Once prepared, it can hold data separately from the operating system disk.
Moving the VM to Another Computer
Copy the VM configuration and required VMDK files to the destination computer. Confirm that the destination has sufficient storage and compatible VMware software. If the files are placed in a different folder, reconnect the disk through the VM settings if VMware does not locate it automatically.
Troubleshooting Virtual Disk Problems
The Host Runs Out of Space
A virtual disk's maximum capacity is not a promise that host storage is reserved or available automatically. A growable disk expands as the guest writes data. Check the free space on the host volume containing the VM folder. If necessary, reduce unnecessary data inside the guest or move the VM to storage with sufficient capacity.
The VM Cannot Find Its Disk After a Move
The VMDK path may have changed without the VM configuration being updated, or not all related disk files may have been copied. With the VM powered off, restore the expected file layout or use the VM settings to reconnect the correct virtual disk file. Do not create a replacement disk if the original data is still needed.
Data Is Missing After Removing a Disk
Determine whether the disk was merely detached or whether its VMDK backing files were deleted. If the files still exist and are intact, reattach the disk when appropriate. If they were deleted, recovery may require a backup or specialized data-recovery process.
An Added Disk Is Not Usable in the Guest
Attaching a disk in VMware does not automatically prepare it for files. Use the guest operating system's disk-management tools to initialize, partition, and format the disk. Formatting can erase existing data, so confirm that the disk is new or that its contents are no longer needed.
Exam-Relevant Notes
- The host system runs VMware Workstation Player; the guest operating system runs inside the virtual machine.
- A virtual disk is presented to the guest as a disk drive but is stored on the host as VMDK file or files.
- Disk capacity is the configured maximum size, not necessarily current host-space consumption.
- Growable storage expands as guest data is written; preallocated storage reserves the configured capacity at creation.
- Removing a disk from a VM configuration is not the same as deleting its backing files.
- Moving a disk requires all related files and a valid connection in the VM configuration.
For the broader context, read Virtual Machine Explained and Virtual Machine Files Overview.