Print

Print


FYI

 

  _____  

From: Chris Henley [mailto:[log in to unmask]] 
Sent: Tuesday, January 12, 2010 11:00 AM
To: Laurence Bates
Subject: RE: exporting a VM that has a large, compacted dynamic VHD

 

Nice solution!  I love this kind of thinking.  Would you mind if I blogged
about your story.  I will use only your First name of course unless you
would like full notoriety :-).  Great work!  I will forward this info to our
Hyper-V team with a suggestion to include similar functionality in Hyper-V
manager.  

 

 

Thanks,

 

Chris Henley

 

From: Laurence Bates [mailto:[log in to unmask]] 
Sent: Monday, January 11, 2010 6:21 AM
To: Chris Henley
Cc: 'Bates, Laurence'
Subject: RE: exporting a VM that has a large, compacted dynamic VHD

 

Hi Chris.  After a fairly exhaustive search on the Internet for a technique
to shrink a Hyper-V Dynamically Expanding Boot VHD to a smaller fixed sized
VHD, I concluded that the consensus from Microsoft techs is that Hyper-V
tools cannot accomplish this task.  There are a variety of complex and risky
sounding techniques to do this but I found a tip to what I consider to be
the best one at
<http://weblogs.asp.net/soever/archive/2008/01/15/reduce-the-size-of-a-virtu
al-hard-disk-before-delivery-for-reuse.aspx>
http://weblogs.asp.net/soever/archive/2008/01/15/reduce-the-size-of-a-virtua
l-hard-disk-before-delivery-for-reuse.aspx  It works wonderfully and uses a
highly reliable and time-tested tool that is relatively inexpensive (Ghost).
I have expanded the steps necessary to accomplish the task below.

 

Technique to shrink a Hyper-V Dynamically Expanding Boot VHD to a smaller
fixed sized VHD (Win2008 SP2 or R2):

 

1)    Start with a Hyper-V VM that has a dynamically expanding boot VHD
whose maximum size is too large - i.e. the default settings ;-).

2)    Stop the VM and open the VM's Settings.

3)    Add a new, appropriately sized, fixed VHD as drive 1 on IDE Controller
0. 

4)    Add the physical CD/DVD Drive to the VM.

5)    Restart the VM with a licensed Symantec Ghost 11.5 rescue Boot CD in
the physical CD/DVD drive.

6)    Use Symantec Ghost to copy the larger, dynamically expanding VHD to
the smaller, fixed sized one.

7)    Close the VM after Ghost has completed the task.

8)    Enter the settings of the closed VM and release but do not erase the
dynamically expanding VHD.

9)    Release the VM's new fixed VHD and then re-add it to IDE Controller 0
as drive 0.

10)Restart the VM and check that it boots correctly from the new, smaller
VHD.

 

The initial idea for these steps was found at the URL below:

 

http://weblogs.asp.net/soever/archive/2008/01/15/reduce-the-size-of-a-virtua
l-hard-disk-before-delivery-for-reuse.aspx

 

P.S.  This technique could be used to add this useful capability to Hyper-V.
You might want to suggest it to the Hyper-V developers.

 

Laurence Bates

 

 

  _____  

From: Chris Henley [mailto:[log in to unmask]] 
Sent: Friday, December 11, 2009 12:12 PM
To: Laurence Bates
Subject: RE: exporting a VM that has a large, compacted dynamic VHD

 

Laurence,

I have yet to find a solution to this issue.  I will keep looking but you
have me stumped.  The size limitation on export is 127GB.  Your 25 Gb vhd is
well within those confines.  How have you compacted the disk?

 

 

From: Laurence Bates [mailto:[log in to unmask]] 
Sent: Thursday, December 10, 2009 7:27 AM
To: 'Laurence Bates'; Chris Henley
Subject: RE: exporting a VM that has a large, compacted dynamic VHD

 

Hi Chris.  Any thoughts on this?

 

Laurence Bates

 

  _____  

From: Laurence Bates [mailto:[log in to unmask]] 
Sent: Tuesday, December 01, 2009 10:49 AM
To: 'Chris Henley'
Cc: 'Laurence Bates'
Subject: exporting a VM that has a large, compacted dynamic VHD

 

Hi Chris.  We met at the recent Dev Connections and you asked me to email
you and request a solution for dealing with a Windows 2008 Server
(Enterprise) Hyper-V VM that was originally created with a dynamic VHD of
127GB on a 250GB boot drive and now is stuck in a mode where the export to a
second large drive does not complete even after dropping all snapshots and
compacting the VM.  The VM is only using about 25GB of the dynamic disk.

 

Thanks 

 

 

 

Laurence A. Bates

College of Education

Michigan State University

217E Erickson Hall

East Lansing

MI 48824

517-355-2178

[log in to unmask]

 

An exuberant rationalist...