How to Change a VMware Disk to Preallocated

Written by jason artman
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Change a VMware Disk to Preallocated
Preallocating the space for a virtual disk may lead to slightly better VMware performance. (hard drive image by Graham Lumsden from Fotolia.com)

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

Show MoreHide

Instructions

  1. 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. 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. 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. 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. 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. 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. 7

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

  8. 8

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

  9. 9

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

  10. 10

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

  11. 11

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

  12. 12

    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.

Don't Miss

Filter:
  • All types
  • Articles
  • Slideshows
  • Videos
Sort:
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.