Answer the question
In order to leave comments, you need to log in
How to defragment excluded blocks?
Using Disk2VHD, I migrated a physical server (2 TB) to a virtual machine. The result was a VHDX with a size of 120 GB. Deployed it to Hyper-V, everything is ok and without errors. I wanted to upload the image to Azure. But PowerShell says that:
1) VHDX cannot be uploaded, only VHD.
2) Although VHD is possible, but not more than 1 TB (as I understand it, PowerShell does not look at the size of the image itself).
I decided to reduce the size of the allocated space from under the guest system and shrink the rest. But when cutting, he removed only 16 GB and wrote "it is impossible to compress the volume beyond the location of non-movable files." I tried to defrag with different programs (O&O Defrag Professional, Raxco PerfectDisk Professional), but they draw excluded areas at the very end of the volume and do not defragment them.
If there is any other way to compress the virtual machine by cutting off the extra space?
Answer the question
In order to leave comments, you need to log in
There is also Puran Defrag or Defraggler. On a real Puran Defrag machine, I sometimes use boot defragmentation (boot defrag), but I have not encountered a task like yours.
1. Transfer the paging file to another partition, or completely disable it. Reset the status of System Recovery Points. We clean %temp%, trash and windows \ temp. Reboot.
2. Defrag to taste. Reboot.
3. Download Sysinternals Suite
https://technet.microsoft.com/en-us/sysinternals/b...
from it use the sdelete utility to zero out the space on the partition (lack of files does not mean the absence of occupied sectors in the file system)
4. In Disk Management do Shrink on the partition to the desired size. We shut down the guest system.
5. Reduce the size of the virtual disk via PowerShell with the Resize-VHD cmdlet
https://technet.microsoft.com/en-us/library/hh8485...
6. We make Compact using the Hyper-V console or via Diskpart
diskpart
select vdisk file="D:\VHD\vdisk.vhd"
attach vdisk readonly
compact vdisk
detach vdisk
exit
On a physical disk - a third-party program is installed or loaded from LivSD or an Acronis or Paragon boot disk. They move non-movable areas. On a virtual machine, I think they will work too.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question