Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I inherited a Windows Server 2003 R2 virtual machine that was previously running under a failing Windows Virtual Server 2005. Both the C: and D: VHDs were within a few hundred megs of being full.

I created a new Hyper-V-based VM to port the old one to and edited the VHDs prior to using them by expanding them both by 10Gigs.

The integration services install & HAL upgrade went fine but when I boot the VM, both drives were still showing as almost full still.

A quick look with Disk Management shows that they both have an extra 10Gigs of unallocated space tacked onto them.

I'm thinking an easy fix would be to simply down the Win2k3 R2 VM and attach its VHDs to another Win2k8 R2 VM running on the same Hyper-V server and use its disk management tools to extend the partitions to cover the extra 10Gigs added onto them.

Will Win2k8 R2 try to tack any additional "stuff" (drive signatures or the like) onto the VHDs that would prevent the Win2k3 R2 VM from functioning? I'd hate to purchase a 3rd party partitioning utility if I can do things with stuff already in-house.

share|improve this question
    
This is a great question. –  Jim B Jan 15 '12 at 2:58
    
Worked like a charm. –  cpuguru Jan 22 '12 at 0:28
    
Word of warning to anybody that attempts this though...make sure that there are no VM snapshots in the mix as I imagine that's a recipe for disaster. Be sure you're all merged up first. –  cpuguru Jan 22 '12 at 14:13
    
good to hear it worked, out of curiosity why did extending it in place fail? –  Jim B Jan 22 '12 at 20:38

3 Answers 3

up vote 0 down vote accepted

Yes, you can do this. I've done this several times (under VMware vSphere) and have never had any problems. This method should work the same regardless of virtualization platform. I did it just now just to confirm and had no problem whatsoever.

Not being that familiar with Virtual Server or Hyper-V, just make sure that after you extend the volume and remove it from the "placeholder" VM that you remove it only and don't delete it.

share|improve this answer
    
Using Hyper-V I attached the Win2k3 VHDs to a Win2k8 instance and extended the partitions without issue. –  cpuguru Jan 22 '12 at 0:26
    
Glad to hear it. –  joeqwerty Jan 22 '12 at 0:57

Does Microsoft support these dynamic VHD's being "dynamic disks" under HyperV? If so, you could convert them to that and then expand them that way. If not, then I think your idea of using a 2008R2 host to safely expand the basic disk to probably be a good safe way to go about this. You could also boot the server off GPartEd (which is free) and do this, but your mileage may vary with that I've had it complete hose a disk before, and sometimes nuke the MBR.

share|improve this answer

I don't know that if you attach the VHD to a 2k8 system the NTFS version wouldn't get upgraded. If under 2003 they show as having extra space you should be able to extend the partition into the new free space directly under 2003. You should not need any 3rd party tools to extend the partition.

The simplest way is to use diskpart:

  1. Open a command prompt by going to Start | Run.
  2. Enter diskpart in the Open text box, and press {Enter}.
  3. At the DISKPART prompt, enter list volume.
  4. Enter select volume x, where x is the volume number listed that you want to expand.
  5. Enter extend, and press {Enter}.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.