jump to navigation

Expand a Virtual PC hard drive September 17, 2008

Posted by codinglifestyle in Virtualization.
Tags: , , , , , ,
add a comment


Remember the days before 500GB discs were a hundred bucks and you spent all afternoon cleaning out your tiny hard drive to make more room? Well, if you still use virtual machines (VMs) then you probably still have that experience even today. Over the last few years I’ve been handed VMs with a fixed disk of just 10GB. When these VMs suddenly become important this can become a problem. Sure, you can add a disk but often we need to expand the C: drive. After running in to this problem again I thought surely there is a way around this if I look hard enough and indeed there is! Follow the steps below and you will be able to expand your C: drive or even change it from fixed to dynamic (however, an bigger fixed disk offers better performance).

  1. Create larger vhd file with expander utility

    1. Can also convert fixed to dynamic and vice versa
    2. http://vmtoolkit.com/blogs/announcements/archive/2007/01/17/vhd-expander-available.aspx  


  3. Add new vhd file as an additional disk
  4. From command line use diskpart to extend volume (in example volume 1 becomes 20gb after extend)
  5. diskpart: list disk, select disk, detail disk, select volume, extend
  6. Shut down
  7. Remove old disk, set extended disk to primary channel (0)
    1. Optionally delete old vhd file once satisfied everything is working
  8. Boot up on extended disk