The Mind of Scott

Extend or increase the size of the root C drive of a Windows VMware machine

Some guy named S. Barrat came up with some notes on this but I added some useful information to his notes. Note: If you split your virtual disk into 2GB pieces this method does not work. Shutdown the Virtual OS. Make a working copy of the VMWare files for the current image that you want to extend. Yes, copy the whole folder.

In the working copy, add an extra HD disk to the VMware profile, by pointing it to the existing disc image for the root drive used in the original image. In essence the working copy now has 2 drives, which includes the disc for the C root drive from the original VM. Yes, you will have to hack down into the original VM folder (not the copy) to determine the file that corresponds to the 'existing disc image' for your root drive. So a W2K3 VM would have the file Windows Server 2003 Enterprise Edition.vmx or winnetenterprise.vmx. This file will have an extension of .VMDK. The command vmware-vdiskmanager /? will give help.

Open command line on the host, CD to this path: c:\program files\vmware\vmware workstation.

Run this command: vmware-vdiskmanager -x 10GB "c:\my virtual machines\Win2003Server\Win2003Server.vmdk" Where 10B is the new size. In the blink of an eye, this will expand the disk. If disk is type where all space is preaollocated, the VM disk command will NOT happen in "eye blink".

Now, start up the working copy of the OS you made in step 2. After first boot of copy Windows may ask you to reboot --do it. Whenever Windows asks you to reboot --do it! Also, one time I could not boot the copy. I got an error that something was locked by another VM or snapshot. I had to 'remove' the newly added HD in the copy and re-add it.

In Windows, open the Computer Management, and click on Disk Management You should now see the original space (4GB in my case), plus the extra unallocated (6GB) making a total of 10GB Assign a letter to the new drive!

Open command line and run DISKPART, you now need to select and extend the partition to use the additional space. Type... LIST VOLUME, from the list identify which volume is the one you need to extend (Volume 2 in my case). SELECT VOLUME 2, will select your volume. EXTEND, will now extend your partition to use the extra space. You can also use the extend wizard in Disk Management and this probably easier than diskpart.

Flip back to Computer Management to see that your drive had grown to include the extra space.

Shutdown the working copy.

Start the original VMWare copy back up, and note that your primary partition has now grown!

Windows will perform some updates upon restart, which will required you to restart again.

WHEN ALL FINISHED: In the VMware GUI, first 'remove' the added disk from the copy and then you can delete the copy machine from disk OTHERWISE YOUR ORIGINAL VM DISK MAY GET WIPED OUT!


Tech Stuff Page

Home