We Value Your Privacy

We and our partners use technology such as cookies on our site to personalise content and ads, provide social media features, and analyse our traffic. Click below to consent to the use of this technology across the web. You can change your mind and change your consent choices at anytime by returning to this site.

Update Consent
Loading ...

How to Change a VMware Disk to Preallocated

Updated July 19, 2017

When a virtual machine is configured in VMware, you have the option to preallocate disk space, or to simply set a limit and direct the virtual machine to only increase the amount of hard drive space consumed on the host computer when necessary. This minimises the amount of space consumed by the virtual machine on your PC. However, a file that frequently grows and shrinks can also encourage fragmentation, harming the performance of the virtual machine. For best performance, convert a dynamic VMware disk to a preallocated one.

Loading ...
  1. Copy the file representing the VMware disk to the main VMware folder. For example, if the name of the virtual machine is "Windows XP Professional," the VMware disk might be called "Windows XP Professional.vmdk." If you are using VMware Server, the default VMware installation directory is C:\Program Files\VMware\VMware Server.

  2. Click in the address bar at the top of the window after copying the VMware disk into the VMware folder. The address bar at the top of the screen will change to the full path to the VMware installation folder. Highlight the path with the mouse pointer, then right click the highlighted text and click "Copy."

  3. Press the Windows logo and "R" keys simultaneously to display the "Run" dialogue box. Type "cmd" without quotation marks into the box and press "Enter" to bring up the command prompt.

  4. Type "cd" in the command prompt, then press the space bar. Click the "C:\" icon in the upper left corner of the command prompt window, then click "Edit" and "Paste." The path of the VMware installation directory which was copied in Step 2 will be inserted. Press "Enter" to navigate to that directory.

  5. Type "vmware-vdiskmanager -r (name of VMware disk) -t 2 (name of new disk)" and press "Enter." The name of the VMware disk should be the exact name of the file that you copied in Step 1, ending with ".vmdk." The name of the new disk can be anything you like, but it should also end with ".vmdk." This process creates a new file. The new file contains all of the information from the original VMware disk, but the space is preallocated. Note that if the hard drive in your computer is formatted with the FAT32 file system, it is unable to address a file larger than 2 GB. In this case, enter "-3" when typing this command rather than "-2." This creates a preallocated disk that is split into 2 GB files.

  6. Copy the new file into the folder where the virtual machine is located. The original disk that you copied into the VMware installation directory can be deleted. The original disk can also be deleted from the folder where the virtual machine is located after you confirm that the preallocated disk works properly.

  7. Launch VMware. Right click the virtual machine that you have performed the conversion on, and click "Edit VM."

  8. Click the original disk on the device list, then click the "Remove" button.

  9. Click the "Add" button. Click "Hard Disk" in the window that appears, then click "Next."

  10. Click "Use an existing virtual disk" and click "Next."

  11. Click the "Browse" button. Navigate to the new file that you created when performing the conversion, and double click it.

  12. Click "Finish." You may now resume using the virtual machine.

  13. Warning

    The vmware-vdiskmanager tool is not included with VMware Player, the free version of VMware. For this reason, it is only possible to convert a dynamic disk to a preallocated one with VMware Workstation or VMware Server.

Loading ...

Things You'll Need

  • VMware Workstation or Server

About the Author

Jason Artman has been a technical writer since entering the field in 1999 while attending Michigan State University. Artman has published numerous articles for various websites, covering a diverse array of computer-related topics including hardware, software, games and gadgets.

Loading ...