Increasing the size of a IDE disk in ESXi

In my last post we covered increasing IDE VMDKs in VirtualBox, as an addendum to that here's how you'd do the same in ESXi:


  1. Increase the VMDK file with the command vmkfstools -X [new-size] -d eagerzeroedthick [path to vmdk file]
  2. Load the liveCD and grow the partition

Step 1: Increase the VMDK File

  1. Power off the VM and SSH to one of the ESXi hosts that has access to the VMs datastore
  2. Navigate to the VMs folder (usually /vmfs/volumes/[datastore-name]/[vm-name]
  3. Run vmkfstools -X [new-size] -d eagerzeroedthick [path to vmdk file]
This will a while depending on how much larger you are trying to make the vmdk file.


Step 2: Load the LiveCD and grow the Partition

You can download the gparted liveCD here:

http://gparted.org

You can use any distro you'd like, however these instructions will assume you're using this ISO.

Mount the CD on the VM and boot the VM.  It will boot into the LiveCD:


Double-Click the "Gparted" icon on the desktop to launch the utility.



Once in the utility, click /dev/sda2 (or whatever partition you are expanding) and then choose "Resize"



Drag the partition bar all the way to the right and then hit "Resize/Move"



Click "Apply"



Once the operation is complete remove the live CD and reboot the VM.  Once the VM powers up it will now have the new disk size!