Meta

Expanding VMware virtual IDE disk for Windows XP

In VMware ESX 4.x the default disk type for Windows XP 32bit virtual machine is IDE. If you did not size your drive correctly, you will be unable to expand this virtual disk later using the VMware management client. But if you had selected SCSI adapter instead of IDE, then expanding the disk after the installation of the OS is a non-issue.

There are ways to expand the virtual IDE disk, you can use VMware Converter to V2V the virtual machine specifying the new disk size. This process take time to complete. But if you are not afraid of using the command line you can use vmkfstools, this method is much quicker.

Here is how to expand the VMware virtual IDE disk using vmkfstools. The first thing you need to do is to turn on SSH so you can connect to the ESX/ESXi command line console. This procedure works for ESXi 5.0 and I am sure it is the same steps for ESX 4.x. You also need to shutdown the guest OS.

Using Putty or any similar tool I connected to the SSH port of the ESXi host. Navigate to the directory where VMDK file of the guest machine is.

cd /vmfs/volumes/5057492d-0e786a86-c8e6-842b2b02f0b7/my_guest_machine

List the files and note the size of my_guest_machine-flat.vmdk is 32226647040 (30G).

I am going to double the disk size to a total of 60G using the tool vmkfstools. Note that you specify the total disk size with this tool. Also you
must specify the file without the word flat in the name, this in turn will increase the flat file.

# vmkfstools -X 60G ./my_guest_machine.vmdk
Grow: 100% done.

List the files again and note the size increment for my_guest_machine-flat.vmdk 64424509440 (60G).

Now power on the guest machine, you need to download the Extpart.exe utility from Dell, www.dell.com/support/drivers/us/en/19/DriverDetails?driverId=R64398. Using extpart you can perform an online volume expansion of NTFS formatted basic disc.

Open a command promt windows and navigate to the directory where the extpart.exe utility is.

Execute the below command, c: is the drive you wish to expand, 29696 is the size increment in megabytes. It will only accept megabytes not gigabytes.