Resizing Virtual disks and some annoyances

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
> diskpart

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:
DISKPART> extend

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.

2 Responses to Resizing Virtual disks and some annoyances

  1. Jameel says:

    So then I assume you can’t use this method to extend the system partition in a single disk VM because the pagefile is on it?

    This would explain why other posts I have seen use a bootable Linux iso called Gparted…

    • paulgrevink says:

      Thanks for the feedback.
      That is correct, you can’t use this method to extend a single disk Windows VM. The good news there are a few methods to do the job:
      – the Dell ExtPart utility, download This utility only works on Windows VMs

      – The Knoppix Live CD which includes a tool named QTParted,

      – In most cases I use this method. Stop the single disk Windows VM. On another Windows VM that I use for daily Administration, I add the disk that must be extended as an existing disk and do the extension. When finished, I delete the disk (do not choose the option to delete from datastore). Now boot the Windows VM.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: