Expanding a vmdk size

Posted on 2011-02-22
Last Modified: 2012-08-13
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?
Question by:adjaddy
  • 3
  • 3
  • 2
  • +3

Expert Comment

ID: 34950300
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

Author Comment

ID: 34950315
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.

Expert Comment

ID: 34950316
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
Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.


Accepted Solution

shabrez earned 500 total points
ID: 34950432
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.
LVL 120
ID: 34950795
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.

Author Comment

ID: 34950839

could give me a step by step instructions to do this. the VM has IDE disk
LVL 120
ID: 34950851
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

Author Comment

ID: 34950875

the machine is a VM; would that above process still work
LVL 120
ID: 34950886
yes, we call that a V2V, but the process is exactly the same, as a P2V.
LVL 40

Expert Comment

ID: 34951078
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:; 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. ( 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.

LVL 23

Expert Comment

by:Luciano Patrão
ID: 34979094

@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.


Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SAS Storage with Vcenter 6.0 4 87
ESXi NTP 4 58
Cloning SBS, then moving workstations between cloned domains? 4 74
Unable to clone a Live VM in vCenter 6.x 9 38
HOW TO: Upload an ISO image to a VMware datastore for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere Host Client, and checking its MD5 checksum signature is correct.  It's a good idea to compare checksums, because many installat…
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
Teach the user how to use configure the vCenter Server storage filters Open vSphere Web Client:  Navigate to vCenter Server Advanced Settings: Add the four vCenter Server storage filters: Review the advanced settings: Modify the values of the four v…
Teach the user how to install and configure the vCenter Orchestrator virtual appliance Open vSphere Web Client: Deploy vCenter Orchestrator virtual appliance OVA file: Verify vCenter Orchestrator virtual appliance boots successfully: Connect to the …

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question