Solved

Hyperv VHD

Posted on 2013-11-13
6
43 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:Technodweeb
ID: 39646737
0
 
LVL 56

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 35

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 34

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

To effectively work with Diskpart on a Server Core, it is necessary to write some small batch script's, because you can't execute diskpart in a remote powershell session. To get startet, place the Diskpart batch script's into a share on your loca…
Scenario:  You do full backups to a internal hard drive in either product (SBS or Server 2008).  All goes well for a very long time.  One day, backups begin to fail with a message that the disk is full.  Your disk contains many, many more backups th…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now