Convert Single VHDX with partitions to 3 separate VHDXs RRS feed

  • Question

  • Hi Guys,

    I ran into an issue yesterday. I was shrinking some VHDX files. Single partition systems worked well, but I ran into a VM that had a single VHDX file with 3 partitions on it. When I shrunk the volumes in Disk Management of the VM, I was left with 3 unallocated spaces. I did the usual powershell "Resize-VHD -path 'directory' -ToMinimumSize, and it finished successfully. It wasn't until I went back into the system that I've noticed that the C partition resized properly, but the D and E partition remained with unallocated space.

    At this time I figured I'll use disk2vhd utility to export each drive as a separate VHDX, but after recreating the VM with the new drives and booting into Windows, all 3 VHDX files had the 3 partitions. Only difference the other partitions that were not exported were not available. After removing the missing partitions, I was once again left with unallocated space on each VHDX that I couldn't resize.

    What are some of my options? How can this be done properly? I've tested a scenario, where I would create a new VHDX with the proper size, and then I would use clonezilla to do a block level clone from the old VHDX to the new VHDX. This seemed to work well, but I'm sure there are other options and methods to getting this job done easier.

    Thanks for the help.


    Tuesday, June 28, 2016 9:25 PM

All replies

  • Are the partitions active/online? You can use diskpart utility to bring them back on. Also through the UI but diskpart works better.



    Wednesday, September 14, 2016 5:11 AM