# Tuesday, April 22, 2008

Quite frequently I underestimate how much space my Virtual Machines need, particularly when doing work with MDT 2008 and SMS 2003. This is exactly what happened today and my SMS virtual wasn't happy that it had less than 100Mb space on C:. Fortunately it is really easy to resize a vmdk file. I resized my SMS OS partition using the following command:

vmware-vdiskmanager.exe -x 15Gb D:\Virtuals\LABSRV02\Labsrv02.vmdk

This only gets us part way there though. If you were to start the virtual machine after doing the resize with vmware-vdiskmanager.exe windows would indeed see the new space but the partition would be the same size. I've noticed that a lot of people use GParted but there is an alternative, WinPE.

Attach a WinPE 2 iso to your VM and boot into WinPE. Then run the following:

diskpart.exe
select disk 0
select partition 1
extend

The commands above assume that you are resizing the first partition on the first disk. Using extend will only work if the partition you are trying to extend is the last partition on the disk. You can get more information about diskpart here and more information about using the extend command here.

posted on Tuesday, April 22, 2008 1:19:01 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [1]
Related posts:
How to change the VMWare Workstation Startup Delay