How to Increase VMware Hard Disk Space
83Increase Virtual Machine Partition
A common issue that people run into when using VMware is that once they have created there virtual machine and installed there OS and everything else they eventually run out of room and decide to increase the Virtual machines hard disk / partition.
For this example I am running VMware server on Windows Vista , WIth one virtual machine running Linux Ubuntu 8.04 Hardy and will go through the steps to increase my harddrive size from 15GB to 25GB
Increasing Hard Disk Size on your Virtual Machine ( VMware )
Step 1.
Firs thing to do is locate the location of vmware.exe on your PC typically it will be in C:\Program Files\VMware\VMware Server or VMware Workstation
Once you have located your vmware.exe file open up command prompt on Windows. [Start -> Run -> type "cmd" in the window then press ENTER
Now navigate into the vmware.exe directory , in this case simply C:\Program Files\VMware\VMware Server
From here type vmware-vdiskmanager -x 25GB image.vmdk
- 25GB in this case we would like to make the NEW size 25GB , this method will not remove any exisiting files
- image.vmdk , Name of your Virtual Machine disk my example was Ubuntu.vmdk, if for some reason it doesn't work type the entire path of the vmdk file for example
vmware-vdiskmanager -x 25GB D:\Virtual Machines\Ubuntu\Ubuntu.vmdk
Extending Partition / Hard Disk
Now that you have used the VMware diskmanager to increase size of the Virtual Disk Space , this will create a new parition that 10GB in this case ( original 15GB + 10GB increase). This increased size will not automatically show up when we reboot our Virtual Machine. We need to carry out a few extra steps to make use of this newly created space , this involves extending the partition or merging two partitions together.
Step 2.
Before trying to extend your harddrive to include the newly created partition, you will need to open vmdk file in a second virtual machine. The reason for this is that you cannot extend a partition on a drive that you are actually using system files on, It has to be set as the secondary drive.
So go through the steps of making a new virtual machine and give it 4-5GB or so it doesn't need to be huge. You wont actually need to load any Operating system on it if you use the LiveCD. Before you run your second virtual machine you will need to add the harddrive you wish to increase onto that system , see screenshot
Gparted
Now that you have created your secondary virtual machine, Boot it up and in order to extend our virtual hard disk we will use a inbuilt linux tool called gparted , there are also many other partitioning programs out there including fdisk and many others.
Now we want to load up our ubuntu LiveCD instead of having to install an Operating System, To get your virtual machine to boot up from your LiveCD do the following.
- Use Daemon Tools or any other mounting program and mount your Ubuntu.iso image.
- Start your virtual machine and soon as it starts press ESC to enter the boot menu and from here select CD-ROM
- This will start your secondary virtual machine with the Ubuntu LiveCD
Running Gparted ( Partitioning Program )
To run gparted simply enter the terminal window and type "gparted" , and this will open the gparted gui window. ( Remember to issue this command with root privledges )
Once gparted has started you will see a window similar to below, We see two parition that we want to join together below circled in red, To extend the exisitng partition to the unallocated partition use the resize button to increase the size of the exisiting partition to increase the size.
( Ensure the harddrive is unmounted, and swapoff )
Finishing Up
Now once you have resized your partition to include the unallocated partition size click apply. This may take sometime for it to resize the partition size.
Once this is complete shutdown the virtual machine and remove the secondary harddrive you added in the previous section. Boot your original virtual machine and you should have successfully extended your hard disk space.
Gparted LiveCD
There is also a gparted LiveCD which can be run if you have trouble deleting and creating partitions. Simply mount the gparted LiveCD and follow the prompts.
Link: http://sourceforge.net/project/showfiles.php?group_id=115843&package_id=271779
Other Methods
If you have made your way through this howto and still unable to get it to work you could try the Vmware Converter which can do all this tasks a lot easier, ( yeaa should've told you a lot earlier) its a free download and can perform partition extensions easily.
Windows Method
After you have loaded the secondary harddrive on the secondary virtual machine (windows in this case) to fix the partitions. Run the command prompt and enter "diskpart.exe" or if that doesn't work locate its location and run it through cmd using the directory locations.
Steps - type
- show volume
select volume 2 ( in this case , double check to make sure you have the right one)
extend
exit
Then simply shutdown this virtual machine, remove the secondary hard disk, then startup the original virtual machine.
Any QUESTIONS let me know I will try and help you:)
Extra Storage Capacity
|
Iomega Prestige 1 TB USB 2.0 Desktop External Hard Drive 34275
Price: $99.99
List Price: $170.99 |
|
Western Digital 1 TB Caviar Green SATA Intellipower 32 MB Cache Bulk/OEM Desktop Hard Drive WD10EADS
Price: $81.90
List Price: $109.99 |
|
Western Digital Caviar Blue 500 GB Bulk/OEM Hard Drive 3.5 Inch, 16 MB Cache, 7200 RPM SATA II WD5000AAKS
Price: $50.00
List Price: $85.99 |
|
Western Digital Elements 1 TB USB 2.0 Desktop External Hard Drive WDE1UBK10000N (Black)
Price: $98.99
List Price: $99.99 |
PrintShare it! — Rate it: up down flag this hub
Comments
Nice ,, thanks for adding
my pleasure, hope it helped:)
Good hub, actually i was no much aware of increasing Hard Disk Size on Virtual Machine.
Your Hub give more practical secnario for this...let me apply it and take me more on the topic.
thanks for the comment, you would think a simple thing like increasing hand disk space allocated would be well "simple" but it isn't always. I hear that vmware server 2 is much easier to use and it may have an inbuilt tool to help increase hard-disk size.
Otherwise its always best to allow for future space needs:)
Thx - this was exactly what I was looking for :-)
Your Welcome:) glad it helped
Very helpful hub. I always ran into that problem. Plus vm ware ran a little slow so I just put windows on boot camp. Thanks for the info
Thank you so much, expectus. I spent a long time in installing Debian and all the useful software on VMware, but I found I ran out of hard disk (99% used up) when I finally set every thing well. You saved me, expectus.
Your welcome Steven Tuxfield:) same thing happened to me thats the reason I made this hub:)
THANKS FOR INFARMATIAN
Thanks, this information are very helpful.
thanks for the comments, sujit, abhilash p d and rdcornel
will add some more info on starting the second VM without any OS. It should be straight forward just start it up and make sure there is a cd-rom in the drive or mount an image for your operating system. Will recognize it and go through with the installation:)
Very well written hub .....
very much informative ....
Thanks for sharing this wonderful information ....
Keep up the good work ....
God bless you .......
If you have multiple virtual machine and you wan to increase the size of one of those located in same physical partition then you need to specify the path, otherwise the information is corretc. The path command should be corrected as follows
vmware-vdiskmanager -x 25GB "D:\Virtual Machines\Ubuntu\Ubuntu.vmdk
The quote is missing in the original information.
thanks M.H. Hazarah and jonty :)
thanks the path command
Great information in you Hub!!
Thanks.
You Wrote very Good and keep going
Thanks, it works perfectly
glad it helped hmtrung :)
Thanks for your Valuable Information. Nice Topics
useful information. Thanks
works perfect. thanks a lot,
otherwise i had do all again..















Lgali says:
6 months ago
thansk for this useful info