Solved

Hyperv VHD

Posted on 2013-11-13
6
47 Views
Last Modified: 2015-06-23
I am running hyperv 2008R2. Have a VHD which I want to reduce the size (not the physical but virtual size) because there is a lot of unused space in the VHD (running win2008R2).

Its a dynamically expanding disk. How do I return the free space to the physical hard drive?
0
Comment
Question by:sysadim
6 Comments
 
LVL 11

Expert Comment

by:Gregory Miller
ID: 39646737
0
 
LVL 58

Accepted Solution

by:
Cliff Galiher earned 500 total points
ID: 39646752
Expanding a VHD is trivial, but shrinking one is another story. There is no supported way, and even un the "unsupported, but works"  category, there is no method I trust. The chances of data corruption is just too high.
0
 
LVL 37

Expert Comment

by:Mahesh
ID: 39647335
0
 
LVL 20

Expert Comment

by:Svet Paperov
ID: 39647692
You have to compact the VHD file:
1. Shutdown the virtual machine
2. If you have snapshots you need to delete them and let the VHD merge before continuing
3. Open its Hyper-V Settings from the Hyper-V Manager;
4. Go to the Hide drive section and select Edit the VHD; Run Compact

Once compact is done your VHD will have the smallest size possible considering the data on it.

Since it’s a dynamic VHD with 2008 R2 there is no need to run defrag or Precompact (as for 2003) before compacting the file.
0
 
LVL 35

Expert Comment

by:Seth Simmons
ID: 40845793
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

INTRODUCTION The purpose of this document is to demonstrate the Installation and configuration of the Data Protection Manager product. Note that this demonstration was prepared on the basis of Windows OS is 2008 R2 and DPM 2010. DATA PROTECTI…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question