"Excuse me please. My ear is full of milk..."

– Oliver Hardy, Going Bye Bye (1934)

Skip on down to the menu.

How to make a VMware virtual disk larger

The Situation

This problem presented itself to me when I had run out of room on my virtual drive C. It was originally created with an earlier version of VMware, and the size limit for drives at that time was 2GB. Over time it got to the point where there wasn't enough room to install any more programs, and performance was suffering because the disk was so full. I had been installing new programs on a virtual D drive, but this was a temporary patch at best because there are still files that need to be placed on the system drive.

Now I am using VMware version 3.1.1 and the virtual disk size limit seems to be somewhere in the neighborhood of 6.8GB. VMware gets aroud the size limit by using a series of 2GB files that together make up the virtual disk. Great for new drives, but there is still no feature to expand the size of your current disks.

I finally got desperate enough one day to attempt a workaroud solution so that I could double the size of my system drive to 4GB. I have documented the steps taken so that others can benefit from my pain, and because I'll probably forget what I did by the time I need to do this again.

Here it is.

The solution

  1. Make a backup copy of your current virtual disk(s).
  2. Make another copy of the virtual disk that you need to expand. I called this copy "drive_c_copy.vmdk".
  3. If your guest operating system is a Windows variant, make a system recovery disk. You will need it later. If your guest operating system is Linux make a boot floppy.
  4. Start VMware, but don't boot the operating system.
  5. Open the VMware configuration editor.
  6. You will need to have two free disks as well as your boot disk. In my case I have two virtual disks as well as the CDROM. The primary master (P-M) is drive C, the primary slave (P-S) is drive D, and the secondary master (S-M) is the CDROM. To get the two spare disks I temporarily removed the configuration for the CDROM.
  7. Mount the copy of your virtual boot disk as the secondary master (S-M) (this was "drive_c_copy" in my case). Set the device type to "Virtual Disk". Set the mode to "Persistent". Use the "Choose" button to browse to "drive_c_copy.vmdk" (or whatever you have called it in your case). Click the install button.
  8. I then went to the secondary slave (S-S) menu and created a new virtual disk that was 4GB in size. Call it what you want (I called mine "win2000_c.vmdk").
  9. Now you can boot the guest operating system.
  10. Copy the entire contents of the copy of your system disk to the newly created virtual disk. In Windows you can use either the file explorer or xcopy to do the job. Just make sure that you copy all of the files. Sometimes system and hidden files will not be copied unless you specifically ask for them to be.
  11. When the copy is finished shut down the virtual machine and bring up the configuration editor again.
  12. On the secondary master (S-M), restore the CDROM configuration.
  13. On the secondary slave (S-S), use the "remove" button to remove the copy of your system drive disk.
  14. For the primary master (P-M), use the "choose" button to browse to the filename of the newly created virtual disk. In my case this is the win2000_c.vmdk file. Note: If you are going to copy this virtual disk to another location before using it, be aware that it may consist of more than one file. In my case there is a "win2000_c.vmdk" and a "win2000_c-2.vmdk". You will need to copy all of these files, as they are all parts of the same virtual disk.
  15. Power on the system with your recovery (or boot) disk inserted. Go through the steps necessary to restore the boot partition.
    1. If you didn't make a system recovery disk, I know from experience that this step can be done using the Windows-NT or Windows2000 setup cd. Let the cd boot and start the install process. Once it gets past the point that it looks for an installed version of Windows you can cancel out of the install. It has already fixed the boot sector. I can't remember the exact point that you can cancel out for Windows2000, but I know that it was before it started installing anything.
    2. If your guest operating system is Linux you should use your boot floppy to get the operating system going. Use the control panel (or similar tool, or the command line for the hard-core Linux guys) to create a copy of lilo or grub or whatever other boot program you use. Put it on the newly expanded primary master disk.
  16. Shut down the guest operating system.
  17. Power on the guest system again and enjoy the extra disk space!

Note: You may be tempted to try this trick without making a copy of the system disk. Don't do it because it probably won't work. Certain files, such as the registry and some system files in Windows, cannot be copied while the operating system is running. Making a copy of the disk allows those files to be properly copied.