Home

Phone (907) 727-1489

Hear It From Our Customers

  • Google Review 1

  • Google Review 5

  • Google Review 3

  • Google Review 4

No Fix, No Fee Guarantee

I was frustrated when I tried to compact virtual hard disks from within Hyper V using the Edit Disk options so I resolved to find a better way to do so without using third party tools.  It took me a bit of research to learn how to do this but after reviewing lots of options, I settled on the method below.  I like the fact that you don't need to shrink partitions from within the guest operating system and you don't even need to zero out unused disk space as a lot of other guides recommended.

Make sure that your vhd or vhdx is not mounted by any other operating system or virtual machine, and then, from an elevated command prompt type:

diskpart
select vdisk file="C:\Hyper-V\sampledisk.vhdx"
attach vdisk readonly
compact vdisk
detach vdisk
exit

If you didn't get any warnings, your output should look something like this:

Compact Vdisk commands

 

This process reduced the size of my Master Image from 24GB to 15GB and takes seconds.  It may sound too good to be true but I would be very happy to hear back from you if it worked for you.

 

 

The Real Deal

Alaska Computer Guy Inc has been licensed and insured to operate as a business in the State of Alaska since our founding in 2005. We value your privacy and respect your confidential information and will happily sign a BAA to that affect. Bush orders are always welcome. You'll pay shipping to have your computer brought in, then I'll fix it and send it back.  Pilot's license not required.