Just sharing some of my inconsequential lunch conversations with you... RSS  

Wednesday, January 02, 2008

How to resize a VMWare disk

When we use VMWare to resize a disk, we are resizing the disk itself, not the containing partition. So after the VMWare resize, we had to use some kind of partition tool to get the size we want.

A friend of mine asked me if we could do it using VMWare Converter. I wasn't sure that it worked, so he had to try it: et voilá, it works!

If you want to do it the old way, here a great how to:

  1. Turn off the virtual machine;
  2. Commit/remove all the snapshots first!
  3. Create a good backup of the files!;
  4. Open a Command Prompt and go to:
    C:\Program Files\VMWare\VMWare Server

  5. Run this command to expand the virtual disk:
    vmware-vdiskmanager -x 12GB "My harddisk.vmdk

  6. Note: Because this only expands the disk and not the partition, you'll need to resize the partition table as well. This can be done by 3rd party tools like 'Partition Magic', but also with 'diskpart.exe', builtin into Windows. In my case, this disk is a boot disk, meaning it can't be done on the virtual machine itself. I used another my 2nd virtual machine, running Windows XP.

    Add the increased hard disk to a second virtual machine (must be turned off first!).

  7. Power up this 2nd virtual machine;

  8. Open a Command Prompt and type:
    diskpart

  9. Type:
    list volume

    Remember the volume number (#) of your volume!

  10. Type:
    select volume (the number from step 8)

  11. Type:
    extend

  12. Turn off this 2nd virtual machine and remove the hard disk from the virtual machine configuration;

  13. Finished! (Windows automatically recognizes the new and correct disk and volume size)


Uau. Thank God for VMWare Converter! :)

No comments:

Development Catharsis :: Copyright 2006 Mário Romano