Membership Membership:
Latest New User Latest: vpros
Past 24 Hours Past 24 Hours: 0
Prev. 24 Hours Prev. 24 Hours: 0
User Count Overall: 137

People Online People Online:
Visitors Visitors: 62
Members Members: 0
Total Total: 62

NakedMCSE Computer Tech Support Forums

So you have passed all of the exams and you are now out in the real world of windows servers, linux servers and freebsd servers faced with a tech support problem you have never seen before...

Find free online tech support in the forums below, respecting that advice is free, but work beyond advice is not...

The General forum is provided for off topic discussion.

You need a user account to post - please Register or Login.

Online Tech Support Forums
 
  Forum  Discussions  General  Extending a VHD file and partitions
Previous Previous
 
Next Disabled
New Post 7/3/2014 4:45 PM
Informative
  Walker
119 posts
www.lairdscomputer.com
10th Level Poster


Extending a VHD file and partitions 

Shut down the VPC and copy the VHD file to a Windows 7/2008 R2 or later machine.

Here open up a command prompt and type the following:

select vdisk file="path\to\file"
expand vdisk maximum=16384


Replacing path\to\file with the appropriate path to the VHD file and maximum=16384 with the new maximum size you want it to be in MB.

Exit from diskpart and the VHD files maximum size will have been expanded.

If you only have one partition on the disk then you can open it back up in diskpart and extend the partition:

select vdisk file="path\to\file"
attach vdisk
list volume
select volume=<vol no>
extend

This will extend it to the new size.  You can use 'extend size=x' to extend it by x MB instead of taking the whole extension.

If you have multiple partitions on the disk this will only work for the last partition on the disk.

This was my case.  I downloaded SysRescueCD (sysresccd.org), and booted into that in a virtual with the disk attached.  I then used gparted to move and resize the partitions in the vhd.
This worked, but all of the partitions except for C: had their drive letter changed and once I booted back into the real VM I had to reassign the correct original drive letters.

Walker

 
Previous Previous
 
Next Disabled
  Forum  Discussions  General  Extending a VHD file and partitions
Send me One Million FREE Guaranteed Visitors