Jump to content

Recommended Posts

Posted

Has anyone been able to shrink the size of their Hyper-V VMs? I know I have to shrink it first in windows using the partition disk management console.

 

I have a 3.2tb file server which needs to be moved, so I need to shrink the disk space down to something more manageable.

 

I've removed loads of files and am now down to 200GB but I cant seem to shrink the disk due to an unmoveable files.

 

I've disabled hibernation, set the virtual memeory to zero etc. But still get unmoveable file errors on shrink volume command.

 

Has anyone managed to get around this?

 

Event viewer tells me the file is which seems to be a windows system file:  - The last unmovable file appears to be: \$BitMap::$DATA

 

 

Posted

Yes, using more powerful defrag utilities like Defraggler (lots of other good options available too). Then a restart. Had a pretty good hitrate with that, back when I did this!

Posted

iirc I had something like this but many years ago and I don't think it was on a VM, so I had other options!

 

A quick internet search reminded me of the reason it's such a PITA...

 

"The $BitMap is a special file within the NTFS file system. This file keeps track of all of the used and unused clusters on an NTFS volume. The MFT Bitmap is a system file that's always in use, because it's what stores how data is allocated on the partition"

 

In the end I think I had to use something other than Windows inbuilt tools as unfortunately the OS marking it as unmoveable means for good reasons they leave this file alone.

 

There's a few forum answers out there where people have tried all sorts like the Contig utility and mini partition, GParted bootable CD/USB, block level backups restored to a smaller partition, but honestly I probably would have used EaseUS PM (I  have an older version that I'm pretty sure is virus free). Usual caveats apply, YMMV, possible data loss, have a good, tested backup etc. and obviously I cannot recommend anyone using software like that on a prod server... 

 

Possibly none of that is any good for a VM, but maybe there's something in there to help. Props for removing 3tb though! 200GB isn't bad for moving though nowadays is it, or do you have storage space limitations on the target?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...