New
#51
Good way of shrinking vhds.
Users of Hyper-v know that expandable vhds grow in size each time you upgrade and even if you run disk cleanup and shrink partition, the storage size of the vhd does not reduce - for some reason the space is not freed up externally.
The hyper-v shrink vhd command does not work, nor do power shell commands.
Basically you need to copy partitions in vhd to a new vhd to reclaim space.
Simple cloning does not work, as it ends up exactly same.
I know users have derived ways using image backups etc, but I have developed a very simple way of doing it using minitool partition wizard free.
1) Make backup copy of vhd in case crap happens
2) mount vhd as drive in host PC from disk management
3) create new expandable vhd, same size and format (MBR or GPT) as original.
4) Run minitool partition wizard free and shrink C drive to minimum size.
5) move any partitions to right of C drive leftmost, so all unallocated space is to right of all partitions
6) use disk copy feature of minitool, IMPORTANTLY selecting to NOT resize partitions (otherwise it expand all partitions in ratio to fill unallocated space)
It then gives you option to resize any partition before copying.
Select C Drive and expand to maximum size (all right hand partitions are moved to adjust)
It can take a while but end result is a new vhd that is truly at the minimum storage space externally.
I use VirtualBox rather than Hyper-V, but the method I use is basically as shown at this link, which involves the compact vdisk command within Diskpart:
https://social.technet.microsoft.com...-diskpart.aspx
Before doing this, I go into the VM while its running, and use SDelete (from Sysinternals) with the -z switch. Eg.Then close down the VM and then from the host machine use the diskpart steps in that link to compact it.Code:SDelete -z c:
I think this tutorial qualifies for this thread, at least I am unable to find any documentation about the shutdown command's /fw switch: General Tips Create Shortcut to Boot to UEFI Settings in Windows 10 - Windows 10 Forums
Last edited by Kari; 26 Sep 2017 at 12:14.
I'm not sure if this is published anywhere else, and I didn't know you could do this until I accidently did it a minute ago:
Placing your cursor over any icon on your desktop, and while holding the shift key down, and scrolling your mouse wheel UP(down does nothing), instantly opens the app, file, or folder.
It also does it on the taskbar, but much slower.
One other thing I didn't know:
WinKey+Ctrl+Backspace is Task View.