Diskpart – resizing virtual machine system volumes (windows)

Diskpart works quite well extending disk sizes – …unless its the system disk that you need to extend.

Luckily in the virtual world its somewhat easier to move your disks about. This is a quick list of the steps required to increase your system disk…

You will need to have another virtual machine available to boot into (windows 2003 etc)

  1. Shut down the virtual machine with the system disk you wish to extend
  2. Go into virtual machine settings and increase the system drive size to what you require
  3. Now you need your spare w2k3 virtual machine or similar. While it is in a shutdown state add the system disk you wish to extend into this machine as another hard disk. Note: select “existing harddrive” and not the default option of  “new harddrive”, and point to the system drive you wish to extend (It is possible to attach this disk as long it is not on and being used)
  4. Power up the spare machine with the newly attached hard drive (the drive you wish to extend)
  5. Logon, open up cmd prompt and type “diskpart”
  6. Now you need to find and select your disk. Type “list disk” to see available disk numbers (most likely the last drive letter). Then type “select disk #”   (# = the number you got from the list command)
  7. Next select the volume, similar to above type “list volume” then “select volume #
  8. Type “extend”
  9. Type “exit”
  10. Done – shutdown the machine and disconnect the drive you just extended. Be carefull not to DELETE the drive, you only want to disconnect it.
  11. Now you should be able to fire up the original machine and it will have a larger system drive.

There are obviously other 3rd party utilities to do this but this is handy to know and is actually quite fast.