I have prepared the VHDX (or VHD in some cases) and it’s SYSPREP. Now my C Drive is only 60GB but I would like to extend the hard disk to 100GB, to enable for me to install other applications on the C Drive.
I’m going to share how I do it.
My VHD is in the external drive (USB connected Hard Drive).
Location E:\VHD\Demo.
The VHD File is WIN81-ENT-x64-SYSPREP1.vhdx
I mount the drive to check on the space
As you can see it’s about 60GB. I’ll unmount and show the steps using DISKPART command
The command as follow :
- Open Command Prompt with Administrator rights
- Key in DISKPART
- Next key in Select the Disk of where your VHD is located. For me is located at E Drive. Therefore I key in as select vdisk file=”E:\VHD\Demo\WIN81-Ent-x64-SYSPREP.vhdx”
- Next to expand the TOTAL size of the VHD. I key in as expand vdisk maximum=100000
- Next key in attach vdisk
- Then key in list disk to view. If it’s not online then key on ONLINE DISK. It should be online automatically.
- Next key in list volume
- As you can see the volume shows as still 60GB
- I key in as select volume 6
- Key in extend
- Key in list volume to see the new size
- Opening up the attach disk, now it’s close to 100GB
Now I’m done, I would like to detach the VHD
Back to the DISKPART command prompt
- Key in detach vdisk
- Key in exit to quit diskpart from command prompt
In summary, I’ve keyed in as follow :
- DISKPART
- select vdisk file=”E:\VHD\Demo\WIN81-Ent-x64-SYSPREP.vhdx”
- expand vdisk maximum=100000
- attach vdisk
- list disk
- list volume
- select volume 6
- extend
- list volume
- detach vdisk
- exit
Command in diskpart is in GREEN, you change those values in PINK
Hopefully the steps are helpful.
keywords : diskpart, extend vhdx, extend vhd, expand volume size
No comments:
Post a Comment