[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Hyperv VHD

Posted on 2013-11-13
6
Medium Priority
?
52 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 12

Expert Comment

by:Gregory Miller
ID: 39646737
0
 
LVL 59

Accepted Solution

by:
Cliff Galiher earned 2000 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 38

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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

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…
When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

650 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