Geeks With Blogs
Rodney Vinyard - .NET & SQL Developer When all is said and done, more will be said than done

Topic: Grow a VMware virtual bootable hard disk (vmdk)

 

 

I followed this article:  http://vmprofessional.com/index.php?content=2k3resize

 

Before you begin, make sure that you do not have an active snapshot on the VM, extending a virtual disk with a snapshot will cause corruption

Extend the boot volume of Windows Server 2003 Virtual Machine
To start, I have a Windows Server 2003 Virtual Machine that has a 5.3G disk allocated to it, I need to expand this disk to 10G.


Step 1: Power off the virtual machine that holds the boot volume that you want to extend.

Step 2: Make a backup copy of your virutal disk, this is optional but if you mess up don't call me unless you're willing to pay.

Step 3: From the service console, increase the size of the .dsk or .vmdk virtual disk file. This can also be accomplished through the Virtual Infrastructure Client if you are using VirtualCenter 2.x+.

[root@esx-test local]# ls -lah test.vmdk

-rw-------    1 root     root         5.4G Jul 18 13:57 test.vmdk

Extend the virtual disk with vmware-vdiskmanager.exe. The input to the -X switch is the size that you want the disk file to be not the size you want to extend the disk file by.

[root@esx-test local]# vmware-vdiskmanager.exe –d "C:\VideoBank\VMs\2003 Server - 02 WebXpress.NET + VS2005\Windows Server 2003 Standard Edition.vmdk"

 

 

 

 

Using out-of-box VMware dos utility as follows produces error

 

 

DiskName or some other argument missing

 

So then I

1.       downloaded and installed the “Petruska family” VMware DiskManager GUI tool

2.       http://petruska.stardock.net/Software/VMware.html (moved to http://vmxbuilder.com/ )

3.       the tool worked just fine J

 

 

 

 

View the new size of test.vmdk

[root@esx-test local]# ls -lah test.vmdk

-rw-------    1 root     root          10G Jul 18 13:57 test.vmdk

Step 4: For this step you will need an additional Virtual Machine running Windows Server 2003. Power off the second Virtual Machine, and add the disk from the first Virtual Machine to it through the mui.

In the Virtual Machine Settings window, click on the Add… button at the bottom

When you click the Add button, use the Browse button to point to the VMDK file for the first VM, and add the VMDK file.

 

 

 

Power up the second Virtual Machine and verify that the imported disk has unallocated space on it.

From the run menu type "diskpart.exe" to enter the command line utility to resize disk partitions in Windows Server 2003.

The command list volume will show you all the available volumes. Select your volume as shown below. select volume 1 corresponds to the "D" volume that I want to extend. Finally extend the volume with the extend command.


If all goes well, the partition will be immediately exnteded under the Disk Management snap in.


Step 5: Shut down the second Virtual Machine and remove the disk from the second Virtual Machine. Power on the first Virtual Machine and check out your new space.

 

 

 

 

 

Posted on Thursday, January 1, 2009 2:42 AM | Back to top


Comments on this post: Grow a VMware virtual bootable hard disk (vmdk)

# re: Grow a VMware virtual bootable hard disk (vmdk)
Requesting Gravatar...
Before you begin, create a backup copy of the virtual disk so that you can restore it in case of failures. Extending a virtual disk can be a complex operations for several reasons, e.g.,:

a) The virtual disk that is full happens to contain the boot/primary partition for Windows
b) There are snapshots
c) There is insufficient disk space available on the physical drive to permit growth
d) It is a multi step process and involves use of different tools and commands in a specific sequence. Creative individuals have devised workarounds to extend the primary partition for Windows by using Linux boot disks and disk partitioning tools such as GParted, and you have to get this right.

You’ll find several posts regarding this topic on Google. Essentially, they are all variations of the posts summarized in

http://blog.sharevm.com/2010/01/11/survey-extend-expand-vmware-virtual-disk/
Left by Paul Evans on Jan 15, 2010 1:00 AM

# re: Grow a VMware virtual bootable hard disk (vmdk)
Requesting Gravatar...
Rodney … thanks for the excellent post. We took several such posts and automated the extension process into a tool called fatvm @ http://www.gudgud.com/fatvm

Would love to get your feedback.
Left by kds on Feb 10, 2010 7:13 PM

# re: Grow a VMware virtual bootable hard disk (vmdk)
Requesting Gravatar...
Thanks alot for letting us know about this, was really handy to have this information.
Left by cheap canvas print on Jul 05, 2011 6:55 AM

Your comment:
 (will show your gravatar)


Copyright © Rodney Vinyard | Powered by: GeeksWithBlogs.net | Join free