If you have a Windows virtual machine with an operating system prior to Windows 2008, where this function is available, you need a third-party tool to expand your partitions. This tutorial will explain you, step-by-step, how to do this task; you can do it on both data disks and boot disks.
- From vClient, go to VM settings (in this example, is a Windows 2003 Enterprise x64)
- Choose the hard disk you want to expand. If the size bo is greyed-out, there are two possible causes:
– there is a snapsoht on the disk. You need to delete it, otherwise expansion is not possible
– it’s a IDE disk. In this case(for example a VM with Windows XP) you cannot extend the disk.
- Change the size by your needs. You will only be able to increase the size, not to reduce. Maximum size depends on the datastore hosting the disk. vCenter will tell you when the task has been completed.
- Log into the VM
- Check if Disk Manager shows the increased disk. You should see a screen like this:
After checking, CLOSE Disk Manager. ExtPart will return the error “Unable to connect to C or it does not exists” if you leave Disk Manager open. - download ExtPart and save it on C: (or in another path where you can go from command prompt)
- Open command prompt, go in the directory contening ExtPart, and run these commands:
extpart <- ENTER
c: <- ENTER
<additional_space_in_MB> <- ENTER - Some hits: disk need to be indicated with a colon after the drive letter.
About additional space, if you added 10 Gb like in my example, you will input the value 10240. If you get back an error like this (I created it on purpose by declaring a higher value):
you can run ExtPart multiple times adding less space (maybe 10000, then 200, then40) until you fill all the additional MB you gave to th disk. If everything went well, you would end up with a screen like this:
- Last check, open again Disk Manager and check the new layout, without unassigned MB:
Disk has been expanded successfully.