IT_Fanatic
asked on
Hyper-V VHD compression help
I have windows server 2008 standard R2 with hyper v installed. I have 4 hyper V machines running. I know the only way to regain the free space from the VHD to match the server is to compress it. Is there a rule of when you should compress the VHD? Meaning don't do it when its a certain size or don't let it get to a certain size?
Thanks
Thanks
I'm not aware of any issues on size other than the time it will take to compress. Have a look at the zerodata tool mentioned here http://msmvps.com/blogs/anguslogan/archive/2004/10/03/14756.aspx
My experience under Hyper-V R2 is that precompaction isn't needed, at least for Windows VMs. Notice that the precompaction tool that shipped with Virtual Server 2005 isn't included with Hyper-V. My guess is that the VHD compaction routine looks at the NTFS structures within the VHD to find the actual data to be copied.
ASKER
That is inaccurate. Hyper V manager doesn't compress automatically a VHD that is setup for dynamic. You will have to turn off that VM and then use hyper v manager to compress the VHD to regain free space
I was talking about the pre-compaction utility that shipped with Virtual Server that was needed to defragment (and possibly zero out) the VHD before VHD compaction. You still need to turn off the VM in order to compact the VHD. There isn't a supported specification for compressing a VHD, but rather to compact a VHD, which essentially removes all of the white space in a VHD in order to make the file physically smaller. Nothing is actually compressed.
ASKER
Regarding this topic I wanted to know if there is a certain rule of size of when and when not to compress to get my space. I haven't really found anything online that talks about it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
So basically there is no rule. You just look and the HDD from the VM and compare it to the VHD and see if its worth the time to compress?
Yes. Ask 100 admins you'll get 101 different answers. :-)
ASKER
Thanks for your response. You clarified what I have always thought.