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.
- Skill level:
- Moderately Easy
Other People Are Reading
Things you need
- VMware Workstation or Server
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.
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."
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.
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.
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.
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.
Launch VMware. Right click the virtual machine that you have performed the conversion on, and click "Edit VM."
Click the original disk on the device list, then click the "Remove" button.
Click the "Add" button. Click "Hard Disk" in the window that appears, then click "Next."
Click "Use an existing virtual disk" and click "Next."
Click the "Browse" button. Navigate to the new file that you created when performing the conversion, and double click it.
Click "Finish." You may now resume using the virtual machine.
Tips and warnings
- 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.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for