One of my virtual machines recently got dangerously close to its maximum available space so I had to add more. You can avoid this by specifying more than enough space when creating the virtual disk, – if you’re not using fixed preallocated space, the virtual machine won’t take all the space on the hard disk until it needs it, as this just sets the limit how far it can grow. Since my procedure wasn’t as simple as I expected, here are the steps for my own reference:
1. First I had to delete all snapshots, as leaving them there can cause corruption.
2. Next I went into configuration and added 6 GB more, increasing the disk size to 12 GB, or so I thought, because this additional space became available only as a separate raw partition.
To make it available within the system partition (C: drive) of the Windows XP virtual machine I had to either add it as a dynamic disk, or rather repartition the virtual disk so the new space appears within. Repartitioning the system partition is always tricky in Windows, so since I didn’t want to spend money on otherwise excellent Partition Magic or similar tools:
3. I downloaded a free repartitioning Gparted LiveCD ISO image.
4. Then I set the VM properties to use the file with the iso image as a CD drive but nothing happened, so I had to go into virtual machine settings and change these options:
5. Mark the checkbox to set CD device in VMware to “Connect at powerup”.
6. I had to go into BIOS setup of the VM machine to set boot priority of the CD/DVD above the hard disk. Getting there was tricky because the VM Player’s default pause for pressing F2 to enter setup (or Esc for boot prompt) is very short and during that second or two I had to first click inside the window and then press the correct key on the keyboard. There is a workaround in VM config, but I used my quick fingers instead.
7. Then I finally booted up the VM with the LiveCD. Starting Gparted in GUI mode, there was a problem with mouse clicks being so misaligned that it rendered the mouse dysfunctional because VMware tools don’t exist on this Live CD. There’s a command line utility, but before trying that I managed to navigate through the GUI menus using the Alt and Tab buttons.
8. Once I got to set the options I wanted, the partition resizing went easily and quickly (had to remember to apply changes before exiting the program and shutting down).
9. After removing the ISO image LiveCD from the DVD device config, the virtual machine started up flawlessly and showed the system partition having the entire 12 GB.