Solved

Hyperv VHD

Posted on 2013-11-13
6
44 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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

I had a question today where the user wanted to know how to delete an SSL Certificate, so I thought that I would quickly add this How to! Article for your reference. WHY WOULD YOU WANT TO DELETE A CERTIFICATE? 1. If an incorrect certificate was …
Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…

867 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

24 Experts available now in Live!

Get 1:1 Help Now