Expand a Virtual PC hard drive September 17, 2008Posted by codinglifestyle in Virtualization.
Tags: diskpart, expand, hard drive, partition, vhd, virtual pc, vm
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).
- Create larger vhd file with expander utility
- Can also convert fixed to dynamic and vice versa
- Add new vhd file as an additional disk
- From command line use diskpart to extend volume (in example volume 1 becomes 20gb after extend)
Remove old disk, set extended disk to primary channel (0)
Optionally delete old vhd file once satisfied everything is working
Boot up on extended disk