Free Disk Space on Windows 2008/Vista, Virtualization, Hibernation
We have a large number of servers in our environment which are virtualized and as a result they are created with C drives that are relatively small compared to physical servers (there is no reason to provide a 128 GB C drive on a virtual system if it can be stored in 30 GB). This approach makes it viable to run a large number of virtual guests on a limited amount of disk space. Unfortunately this means that we need to keep the operating system drives a clean as possible. We recently started running out of room on some of our virtuals, and to dig up additional disk space one of the guys here came up with a solid option.
In the example below, we have a Windows Server 2008 system which has 2 GB of memory assigned to it.
We currently had 13.5 GB of available disk space (on our systems which we originally performed these changes, they were often down to less than 1 GB of free disk space).
To free up the drive space, we removed the file for hibernation. This is done with the “powercfg –h off” command from the command line. As shown below, this will fail unless you open the commandline with administrator rights as shown below:
A successful removal of the hibernation file is shown below:
This freed up an additional 2 GB of disk space on the C drive (the same size as the amount of memory shown on the server above) and did not require a reboot of the system.
For virtual systems this removes the ability to hibernate, but we do not use hibernation on any of our virtualized systems so that does not represent an issue.
Summary: Running out of free space on a Vista or Server 2008 and it’s virtualized? Try removing the hibernation file!
Thank you to Shane Carden who took our lack of disk space situation and tracked down this option!