Windows 10: Compacting virtual hard disks

Page 2 of 2 FirstFirst 12
  1.    20 Mar 2017 #11

    Thanks guys - I must have had some other issue. I will try again.

    It is interesting how compact works in lx07 example on same vhd using batch file. I agree running a batch is possibly less of a faff, but plus of Macrium route is less risk as original vhdx is not touched.
      My ComputerSystem Spec

  2.    24 Apr 2017 #12

    Kari said: View Post
    Please do not take this wrong, I just have to say that your process involves awfully lot unnecessary work!

    To start with, a dynamically expanding VHD can only grow. It never shrinks, that's not what Compact Disk means. Each checkpoint, even when later removed makes VHD bigger, and so on.

    My workflow when I want to free unnecessary space used by my dynamical VHDs:

    • Disk clean-up
    • Create Macrium image of my VM
    • Shut down VM
    • Replace existing VHD with niew dynamically expanding one in VM settings
    • Restore Macrium image to new VHD

    Can't understand why you mount VHD in host, can't understand why to save old VHD as .bak when Macrium Image exists.

    Of course I also export all new Hyper-V virtual machines as soon as I have finished installing Windows, when the VHD file size is smallest. If then later I want to start from scratch, from freshly installed Windows, I just delete the VM and import it back.

    Yesterday I did exactly that but when I restored Macrium image to a new vhdx, I ended up with a 38 GB vhdx even though actual install was less than 20GB. What seemed to be causing issue was that I had a partition at end of vhdx after the C drive.

    So I created new vhd reordering partitions so C drive was last but it still did not shrink below 38 GB. No idea why though.

    So, I tried again but this time I restored Macrium image to a new vhdx with same reordered partitions so C drive was last, and this time made sure vhdx was initially only slightly larger that all the partitions actual used space (so Macrium was forced to shrink the C drive to fit).

    This worked creating a <20 GB vhdx file. Then it was a simple case of expanding vhdx file in hyper-v and extending C drive to fill unallocated space.
      My ComputerSystem Spec

Page 2 of 2 FirstFirst 12

Related Threads
Good day everyone The reason why I want to install Windows 10 on each of my two hard disks is because the Win 10 on my first disk is for my job, where I need to install software provided by my employer. The second Wind 10 on my second hard disk is...
Hello everybody, recently I've installed Windows 8,1 Pro version on my laptop and today I'm trying to install Microsoft Office 2007 Enterprise. I've have it on CD but when I'm trying to run it there's a message that says : "Virtual hard disk...
How to Change Default Folder to Store Hyper-V Virtual Hard Disks Hyper-V enables running virtualized computer systems on top of a physical host. These virtualized systems (aka: guests) can be used and managed just as if they were physical...
Hi There I am using windows 10 Pro, and had a virtual machine installed using Hyper-V with two virtual HDD in that VM. Recently I had some problem with my Windows 10 OS and had to reset my windows with keeping all the files and settings, and...
Updated to build 9879 with no problems from build 9860. However, I powered down and restarted the next morning to find "Disk Boot Failure - Insert system disk". Whatever I tried to see inside the disk failed because it wasn't recognised in...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 11:33.
Find Us