Expanding a vmdk size

I have a vCenter server running on Windows XP Pro VM (VM version 7) on ESXi 4.0 host. It only has one volume on which XP has been installed.
I wish to re-install a Full version version of MS-SQL 2005 which is currently running on it so i can migrate the vcenter database to a new platform. I'm unable to increase the volume either through vsphere client (Edit settings of the VM) or using vmkfstools. any suggestions?
Who is Participating?
shabrezConnect With a Mentor Commented:
Step # 1: Shutdown The Guest Operating System

Shutdown and poweroff.

Delete all your snapshots from snapshot manager by visting VM > Snapshot Manger. Since you are going to resize you virtual disk, these snapshots going to create a problem for you.

Backup your entire virtual machine.

Another option is you can clone your guest in VMware, if you want to keep the existing virtual machine configuration by visiting VM > Clone option.

Step # 2: Increase Your Virtual Machine's Disk Capacity

Open shell prompt and type the following command:

# /usr/bin/vmware-vdiskmanager -x {diskSize}GB yourvm.vmdk

If you are using Windows operating host system change directory to C:\Program Files\VMware\VMware Workstation or add this to your PATH settings.

Click on Start > Run and type cmd to open Windows shell prompt:

vmware-vdiskmanager -x {diskSize}GB "c:\vm\yourvm.vmdk"

OR use full path as follows

C:\Program Files\VMware\VMware Workstation\vmware-vdiskmanager -x {diskSize}GB "c:\vm\yourvm.vmdk"

Example: Increase Size to 32GB

Linux host example:
# /usr/bin/vmware-vdiskmanager -x 32GB /share/vms/WindowsVista/vista.vmdk

Windows host example:
C:\Program Files\VMware\VMware Workstation\vmware-vdiskmanager -x 32GB "c:\vm\centos.vmdk"

Step # 3: Expand The Size Of a Virtual Disk

Now, disk size is increased but operating system will only show 16GB used and 16GB unused. To add new 16GB to C: (i.e. expand the size of a a virtual disk), use GParted. You will need to use a third-party utility such as GParted to resize the expanded partitions.
When you say you are unable to expand it, does it fail? Or does it succeed but when you log into the volume it appears the same size?

If the latter, remember you then need to expand the volume from within the VM - use Windows DiskPart
adjaddyAuthor Commented:
in vsphere, the box to increase the size of the vmdk file is greyed out.
when i connect via putty to the host, i am unable to add the additional  size to the OS partition volume.
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

Oh, and another thing - make sure you're running vmkfstools against the descriptor vmdk file, and NOT against the file with "flat" in the name
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Are youi using an IDE disk in the Virtual Machine, because you cannot expand them, only SCSI.

If you want to expand an IDE based VM, you'll need to use VMware Convertor.

It's a free download here.

adjaddyAuthor Commented:

could give me a step by step instructions to do this. the VM has IDE disk
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
okay, this is the reason you cannot expand it. IDE disks do not support Expansion.

for conversion steps follow my fellow Expert Bestway's guide

adjaddyAuthor Commented:

the machine is a VM; would that above process still work
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
yes, we call that a V2V, but the process is exactly the same, as a P2V.
Doing a conversion can help with increasing the disk size, but won't take care of the underlying problem of the virtual disk being IDE (if that indeed is the issue). If you need to modify your disk size in the future, I recommend modifying your virtual disk now to SCSI. That way you can modify your virtual disk as needed in the future without having to do a conversion. Conversion is good, but takes much longer. See this KB to change your virtual disk to SCSI:

To increase your disk in the future, once it's changed to SCSI, see this KB:
http://kb.vmware.com/kb/1004071; another option to increase your system volume (C:) virtual disk size once it's converted to SCSI, is to power down your VM and go into its Edit Settings and remove this virtual disk (*DO NOT DELETE*). On a 2nd VM, go into its Edit Settings area and Add a Hard Disk -> Use existing virtual disk, and browse to the datastore and VM folder location of the orig VM's vmdk file. Power down the 2nd VM and modify the virtual disk size as needed. Power on this 2nd VM, go into CMD window and use DISKPART to modify the partition size. (http://support.microsoft.com/kb/325590) Once modified, go into this 2nd VM's Edit Settings and remove the virtual disk (again, *DO NOT DELETE*), then re-add it to the orig VM. If the drive is a non-sys volume drive, you can simply power down the VM, modify the disk size, power the VM back up, then use diskpart to change the partition size.

Luciano PatrãoICT Senior Infraestructure  Engineer  Commented:

@coolsport00 You can also change the IDE to SCSI by converting the VM

On the Options step, you just need to choose "Edit Devices". Inside this option you can change the "Disk Controller".

Honestly never test this option, but there is an option to change this.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.