Wednesday, October 24, 2007

Extending a VMware Disk part II

so you've extended your virtual "Physical" disk and now what? you have all this empty space.

you need to extend the existing volume to the new one.

there are serveral partitioning programs out there such as Gparted that work (ensure you have version 3.1.1 as newer versions dont load vmware images. who broke this?), but mirosoft (if using a windows server) also have a solution already prebuild.

its called diskpart.exe, and it may be your new best friend.

basically, open up a command prompt and do the following
At a command prompt, type diskpart.exe.
2.Type list volume to display the existing volumes on the computer.
3.Type Select volume volume number where volume number is number of the volume that you want to extend.
4.Type extend [size=n] [disk=n] [noerr] . The following describes the parameters:
size=n
The space, in megabytes (MB), to add to the current partition. If you do not specify a size, the disk is extended to take up all of the next contiguous unallocated space.

disk=n
The dynamic disk on which to extend the volume. Space equal to size=n is allocated on the disk. If no disk is specified, the volume is extended on the current disk.

noerr
For scripting only. When an error is thrown, this parameter specifies that Diskpart continue to process commands as if the error did not occur. Without the noerr parameter, an error causes Diskpart to quit with an error code.
5.Type exit to quit Diskpart.exe.


this is from the kb article http://support.microsoft.com/kb/325590 , but i have used it and it DOES work.

the only time this will not work is if the volume you are trying to extend contains the pagefile.sys file. if it contains this file, it wont allow you to extend the volume.

No comments: