Sunday, November 22, 2009

How to increase the size of vmware hard disk (.vmdk)

I was preparing 64-bit VM for my (SharePoint 2010 beta) development environment using VMWare, with the capacity of hard disk 20GB. But in order to install everything required for SharePoint 2010 beta 20GB was not sufficient, so I planned to increase the size of hard disk. I thought it would be very easy to increase the size of hard disk through management web console of VMWare but I could not find any option to increase the size of hard disk. After searching on the internet I found following some blogs/articles on same issue but nothing could work for me as it is mentioned in following links:

http://www.novell.com/coolsolutions/tip/15344/html
http://consultingblogs.emc.com/kalpeshprajapati/archive/2007/07/24/How-to-Extend-virtual-Hard-Disk-_2008_-WMWARE_2900_.aspx

When I ran command:
c:\program files\VMWare\VMWare Server>vmware-vdiskmanager.exe -x 30Gb "filepath\filename.vmdk"

I got error:
FILE: FileIO_Lock on 'filepath\filename.vmdk' failed:Lock timed out
Failed to open the disk 'filepath\filename.vmdk': The file is already in use (0x400800000000f).

So in order to increase the size of vmware hard disk, I have performed following steps

1- Make sure VM is stop
2- Remove the hard disk from VM
3- Increase the size of hard disk using aforementioned command
4- Attach the existing hard disk with VM
5- Turn on the VM
6- VM was up and running successfully with extended size 40 Gb of hard disk
7- Turned on the VM
8- Go to command prompt and type diskpart
9- then type list disk
10- then type list volume, which shows all the drives with volume numbers and other information. In order to increase the size of respective disk, volume is required to be selected
11- Type select volume=
12- After selecting the volume, type extend
13- Done

Hoping this will help someone else time while increase the size of VMWare hard disk.

Following are the steps which I followed in order to increase the size of hard disk

No comments:

Post a Comment