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

  • http://harismalik.blogspot.com Malik

    Need help
    I have taken image of one of my server using Backuexec server 7.0 and used the same to convert to vmdk how do i import it to my storage of ESX 3.0.1 ??? , i used vmkfstool as follows:
    vmkfstool -i , when it had done with cloning i saw that there was a file in my storage by name vmhba0:0:1:0 , my point is after i import i should be able to create VM using VMclient 2.0 selecting create VM using exisitng Virtual disk.where am i wrong.

  • http://harismalik.blogspot.com Malik

    Need help
    I have taken image of one of my server using Backuexec server 7.0 and used the same to convert to vmdk how do i import it to my storage of ESX 3.0.1 ??? , i used vmkfstool as follows:
    vmkfstool -i , when it had done with cloning i saw that there was a file in my storage by name vmhba0:0:1:0 , my point is after i import i should be able to create VM using VMclient 2.0 selecting create VM using exisitng Virtual disk.where am i wrong.

  • http://vmetc.com rbrambley

    Malik,

    If you already have the image converted to .vmdk format – you mean a stand alone virtual machine? Then the easiest thing to do would be to use VMware Converter on the same computer as the .vmdk and v2v it to ESX.

  • http://vmetc.com Rich

    Malik,

    If you already have the image converted to .vmdk format – you mean a stand alone virtual machine? Then the easiest thing to do would be to use VMware Converter on the same computer as the .vmdk and v2v it to ESX.

  • http://vmetc.com rbrambley

    I am closing the comments on this post. Please use my Insane page for general questions and comments.

    Thanks, Rich

  • http://vmetc.com Rich

    I am closing the comments on this post. Please use my Insane page for general questions and comments.

    Thanks, Rich

  • Pingback: | Simson Lai website

  • steve o

    OMG, could you make it any easier?… thanks sooooo much!!

  • steve o

    OMG, could you make it any easier?… thanks sooooo much!!

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