Badges

gestaltitbadge

follow-me-twitter

Subscribe to me on FriendFeed

Comments / DISQUS
Feedjit.com

Increase the size of a virtual disk on ESX

When I need to increase the size of a virtual disk (.vmdk) I use the console command vmkfstools and the Gparted LiveCD. If you did not know, Gparted is an open source Partition Magic Alternative.

Here’s how I grow a VM’s disk. These steps are for a Windows VM. They should work for any OS, however.

  1. Download the Gparted LiveCD ISO. You will need to save it to a location you can use it to boot the VM.
  2. Shutdown the virtual machine you want to resize
  3. Log into the ESX Server via Putty, or however you can get to the console.
  4. Use vmkfstools to increase the size of the .vmdk For example if you had a VM named “MyOS” in a folder called “myVMFS” and you wanted to increase it from 20GB to 24GB you would type (it is case sensitive):
  5. vmkfstools -X 24g /vmfs/volumes/myVMFS/myOS.vmdk

    or

    vmkfstools -X 24576m /vmfs/volumes/myVMFS/myOS.vmdk

  6. Boot the VM to the Gparted ISO
  7. Once the Gparted partition editor loads, click your disk in the partition list
  8. Click the Resize/Move button
  9. Drag the arrow to extend the size of the partition. Be sure to work out the free space before and/or after the partition by sliding the whole partition either left or right.
  10. Next click the Apply button to start the resizing process.
  11. After it completes click the Close button
  12. Reboot the VM without the Gparted ISO to the VM’s OS.
  13. You will have to wait for a chkdsk on the reboot. Then Windows will reboot again.
  14. Check your new disk size in My Computer and Disk Manager!

vmkfstools is a powerful console utility. If you would like to RTFM, I have saved the output of “man vmkfstools” here

Related Posts

Get My Podcast On iTunes!
Support VM /ETC
Support VMETC.com

Support VMETC.com

Free Business and Tech Magazines and eBooks
@rbrambley tweets
VMTN Roundtable Podcasts
Subscribe



Add to Google Reader or Homepage
Subscribe in NewsGator Online
Add to netvibes
Add to Plusmo