![]() Now, open the Hyper-V Manager, right click on the virtual machine, and choose the Settings command from the resulting shortcut menu. As with a physical hard drive though, there may be some data that cannot be moved.Īfter you defragment the virtual hard drive, shut down the guest operating system. This has the effect of moving the data to the beginning of the file, and shifting empty space to the end of the file. The same thing happens on a virtualized system, except that the blocks are being moved within a virtual hard drive file rather than on a physical drive. On a physical server, Windows moves around blocks and attempts to arrange them in a contiguous manner. As you can see in Figure A, this tab contains a Defragment Now button.įigure A: You should defragment a virtual hard disk prior to compacting it. ![]() In the case of Windows Server 2008 R2, you would boot the operating system, go into Windows Explorer, right click on the drive that represents the virtual hard drive file, and then choose the Properties command from the resulting shortcut menu.Īt this point, you would go to the properties sheet’s Tools tab. The exact method that you will use to perform the defragmentation varies depending on the guest operating system that is using the virtual hard drive file. Believe it or not, this can be accomplished in a very straightforward manner, through the guest operating system that is using the virtual hard drive file. In many cases, you can accomplish this by performing a defragmentation. ![]() As such, we need to move all of the empty space to the end of the file before we can compact the virtual hard drive. Empty space within a virtual hard drive file is usually scattered throughout the file. As such, the end of the virtual hard drive is guaranteed to have once contained data, and that data may still be there. The virtual hard drive file expanded to its current size as the result of data being written to the file. The problem with truncating the empty space at the end of the virtual hard drive file is that you don’t know where the empty space within the file is actually located. Actually, there is a little bit more to it than that, but the technical details are not important for what we need to accomplish. Essentially, Hyper-V checks for free space at the end of the virtual hard disk file, and then truncates the empty space. The reason behind this has to do with the way that the shrinking process works. Having said that however, if you attempt to shrink a dynamically expanding virtual hard drive file without doing any preparation work first, then you may not see much benefit from the operation. The Hyper-V Manager gives you everything that you need for manually shrinking a volume. Although there is nothing difficult about shrinking a virtual hard disk file using the method that I am about to show you, it can be time consuming, and does require you to take to corresponding virtual server offline. The first option for reclaiming lost hard disk space is to manually shrink the virtual hard disk file. ![]() In this article, I want to explore some techniques for resolving these issues. The nature of dynamically expanding hard drives also makes it easy to waste a lot of storage space since the virtual hard drive files do not automatically shrink when data is removed from them. Unless an organization carefully manages storage resources, this dynamic expansion can make it easy to accidentally over commit storage resources. ![]() Dynamically expanding virtual hard drives initially start out much smaller than the amount of space that you have allocated to them, but will automatically expand as data is written to them. In the first part of this article series, I explained that when you create a virtual hard drive in Hyper-V, a dynamically expanding virtual hard drive will be created by default. If you would like to read the first part in this article series please go to Reclaiming Lost Hard Drive Space on Hyper-V Host Servers (Part 1). ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |