Link to home
Start Free TrialLog in
Avatar of Wolf
WolfFlag for United Kingdom of Great Britain and Northern Ireland

asked on

How do you increase the HDD on a Virtual Machine?

I am running VMware Server on a Windows Server 2003 machine.

I have one Virtual Server setup with a single Virtual Hard Drive of 25Gb.  This Virtual Server, when booted splits the Hard Drive into two partitions:
C$ = 15Gb
D$ = 10Gb

The D drive is almost full and i need to increase it.  How do i go about increasing the size of the Virtual Hard Drive and then increasing the partition?

Avatar of vmwarun - Arun
vmwarun - Arun
Flag of India image

What is your Guest Operating System ? What type of disks are you using inside your guest (Basic or Dyanmic Disks) ?
Avatar of antony_kibble<!-8D58D5C365651885FB5A77A120C8C8C6-->

Okay first thing to do is to check the VMDK (virtual machine disk) integrity. I chose to run checkdisk within my Virtual Machine. You'll need to reboot and the disk will be checked before the machine starts.

Once you're happy with the integrity of your disk its time to expand it. Using vmware-vdiskmanager. You must power the machine off first in VMWare workstation or VMWare Player.

Navigate to your VMWare folder and issue the following command from the command prompt, passing -x to increase the size followed by the new size (e.g. 20Gb), followed by the path to the vmdk file you want to resize.

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

This will take some time, and once complete the application will give you some sizing messages.

Now you need to expand the capacity of the disk to take advantage of its new size. If the disk is the system volume you will need to mount the disk in a second VM and expand it from there. If its not a system volume do it within the virtual machine it belongs to.

Once you've mounted the disk in a different VM or booted up the VM it belongs to if its not the system volume, do the following.

Go to the command line and start the diskpart utility. By issuing the following command.

Once you've started diskpart, list the drives using the following command:

list disk
This will show you the disks assigned to your machine. Now the important command

list volume
This will show you the drives, their volume number, capacity etc. You now need to select the volume you are about to expand, using the following command. Where n is equal to the number of the volume.

select volume=n
Once selected, you can now expand it using the extend command. You can optionally specify the amount extend it by.

That's it.

Once you've extended the disk, it's wise to defrag the drive. If you use the defragment tool in VMWare workstation you will find it much quicker than deframenting the drive from within the machine.
Avatar of Wolf


Thanks very much, that sounds fairly simple but i think it might take a while.
One quetion though...
It's a single Hard Drive with a size of 25Gb, which is then partitioned into a system volume (c) and a storage volume (d).  Because its a system volume would that mean i would have to mount it on a seperate virtual machine?  How do i do that?
Avatar of Wolf


Oh, and its VMware Server, not Workstation, does that make any difference?
First question - don't know, sorry.

Second question - No.

Avatar of Wolf


Do you knkow if its possible to just create a second Hard Drive for the virtual machine?  I could then just partition that as "E" and point the data to it
If i could add a second hard drive that would be a lot easier, but can't see the options in VMware server
Avatar of OxygenITSolutions

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can add a new virtual disk to the Virtual machine and make it E:/.
The option would be available under Add New Hardware Wizard (am not sure of the Menu placement but I think that you can right click on the VM Properties Window and achieve the same).
Avatar of Wolf


I'm going to try using the convertor to clone the virtual machine and increase the drive sizes at the same time - thanks for the help
You can't just add a new virtual disk when you are using VMware Server, only in Workstation and with ESXi/Sphere
Check out Page 144 of this doc -
It says a New Virtual Disk can be added using VMware Server.
Try going into edit setting and increasing the size of the drive you want to increase and then using ExtPart or GParted to increase to size of the partition in the guest OS.

ExtPart -

GParted -
Avatar of Wolf


VMware converter worked great!

I just shut the virtual machine down, used convertor and was able to increase the size of both partitions.

It only took 30 minutes :)