Fastest way to resize a PVS VHD file using diskpart

Got this from here: http://blogs.technet.com/b/danstolts/archive/2011/04/02/how-to-expand-and-extend-to-increase-capacity-on-a-virtual-hard-disk-the-easy-and-fast-way-solve-the-problem-of-out-of-disk-space-on-drive-c-forever.aspx

First, if you have subversions of the PVS disk, merge it to a new base and then rename the new vhd, pvp and lok file. Delete the merged version from the PVS console.

Note, this is not a script, manually run each task, be careful to select correct disk and volume!

diskpart 
Select vdisk file="E:storemynew.vhd" 
list vdisk 
expand vdisk maximum=50000 (in megabytes)
attach vdisk 
list disk
list volume 
select volume 7 (volume number from list volume command) 
extend 
list volume 

detach vdisk  
exit

Import the new disk in the PVS console.

10 thoughts on “Fastest way to resize a PVS VHD file using diskpart

  1. Hi Thanks for your valuable piece of information and helped me to extend the drive successfully usinging DISKPART. however i am unable to boot the new vhd file on target device and getting “windows failed to start…….. Status: 0*c000000e” error.

    If i map the new vdisk as a drive to the PVS server, yes am able to see full drive and with added size. but unable to boot from target device. any idea how to fox this ?

    • I’m having the same issue. I run through the diskpart process and it completes successfully but systems won’t boot from the resized .VHD.

  2. This diskparted still working? But I can’t mount/open VHD file using ‘select vdisk file’, says that my VHD is invalid or corrupted. I’m using PVS 7.6 and this VHD is fine, I can open and use in PVS without any problem.

Leave a Reply

Your email address will not be published. Required fields are marked *

*