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.

Friday, October 19, 2007

Vmware Server - How to grow a existing disk (solution!)

hey all,

i came across a solution for a problem that is becoming more and more common. virtual disks in vmware.. how the hell do you expand a existing disk?

the solution, is quite easy.

open up command prompt and navigate to your vmware workstation or server directory. from there run the command
vmware-vdiskmanager -x 20Gb

where -x specifies a resize, and 20gb is an example size, followed by
d:\VM Folder\vmdiskfile.vmdk

so a full path will look like

"

C:\Program Files\VMware\VMware Workstation\vmware-vdiskmanager -x 20Gb "d:\VM Folder\vmdiskfile.vmdk"


it doesnt take long either!

also note a vmware defrag might be a good idea before you do this for the obvious reasons.