Increasing the size of a virtual disk is a routine job, especially in a Windows environment. Since Virtual Infrastructure 3.5, the Client offers the ability to adjust the size of a Disk File. But sometimes, there are some annoyances.
So open the Virtual Machine Properties dialog box and discover that the Provisioned Size has been greyed out. The cause is in the name of the Disk File, ending with 000001.vmdk. This means there are Snapshot here!
Rule 1: If you want to resize a Virtual Disk, delete the Snapshots!
After deleting snapshots, it is possible to increase the Virtual Disk.
The First step was succesful, now in Windows 2003 we must use the Microsoft DiskPart utility to increase the size of the partition.
1. Open a Windows command prompt and enter the first command
2. The prompt changes to DISKPART>. To be sure that we extend the right partition we want some overview
DISKPART> list volume
3. In this example our partition has drive letter D which is Volume 1, so the next command is:
DISKPART> select volume 1
4. And the final command to extend the partition:
Instead of increasing the partition, this message appears: “The volume you have selected may not be extended. Please select another volume and try again”.
The cause for this message? for some reason a Pagefile was put on Volume 1, as you can see on the overview under “Info”.
Rule 2: DiskPart cannot extend a volume that has a Pagefile!
After moving the Pagefile, it is time to enjoy the extra disk space.