<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Cheng's Random Thoughts on System Management : VHD</title><link>http://blogs.technet.com/chengw/archive/tags/VHD/default.aspx</link><description>Tags: VHD</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Shrink your VHD size</title><link>http://blogs.technet.com/chengw/archive/2009/01/07/shrink-your-vhd-size.aspx</link><pubDate>Wed, 07 Jan 2009 20:24:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3177537</guid><dc:creator>Cheng Wei</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/chengw/comments/3177537.aspx</comments><wfw:commentRss>http://blogs.technet.com/chengw/commentrss.aspx?PostID=3177537</wfw:commentRss><description>&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: SimSun; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-fareast; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"&gt;&lt;?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /&gt;&lt;v:shapetype id=_x0000_t75 coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;Hello there,&lt;/v:shapetype&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: SimSun; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-fareast; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"&gt;&lt;v:shapetype coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;Happy New Year!&amp;nbsp;&lt;/v:shapetype&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: SimSun; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-fareast; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"&gt;&lt;v:shapetype coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: SimSun; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-fareast; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"&gt;&lt;v:shapetype coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;We had a pretty big snow storm during the past Christmas in Seattle area. Wherever you are, I hope you had a safe and relaxing Christmas and / or New Year holiday!&lt;/v:shapetype&gt;&lt;/SPAN&gt;&lt;/v:shapetype&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: SimSun; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-fareast; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"&gt;&lt;v:shapetype coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;&lt;SPAN style="COLOR: black"&gt;If you are still new to VMM, today I'm going to show you a tip on how to "shrink" your VHD size -&amp;nbsp;one of the challenges to virtualization beginners. As you may know, one of the major benefits of using VM is that it allows users to change the virtual hardware without having to tear down a system and rebuild from scratch. I’ve got a few inquiries from customers about how to shrink their VHD size. &lt;/SPAN&gt;&lt;/v:shapetype&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: SimSun; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-fareast; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"&gt;&lt;v:shapetype coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;&lt;SPAN style="COLOR: black"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;Here is how you can shrink a dynamic disk type VHD by using SCVMM 2008. What you need to do is:&lt;/SPAN&gt;&lt;/v:shapetype&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: SimSun; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-fareast; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"&gt;&lt;v:shapetype coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;&lt;SPAN style="COLOR: black"&gt;First delete snapshots if you have and wait till merge to complete.&lt;/SPAN&gt;&lt;/v:shapetype&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: SimSun; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-fareast; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"&gt;&lt;v:shapetype coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;&lt;SPAN style="COLOR: black"&gt;Once merge is complete, issue compact vhd from the VM Properties (see screenshot below):&lt;/SPAN&gt;&lt;/v:shapetype&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: SimSun; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-fareast; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"&gt;&lt;v:shapetype coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;&lt;SPAN style="COLOR: black"&gt;You can also do this from the PowerShell layer by using &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'MS Shell Dlg 2','sans-serif'"&gt;Compress-VirtualDiskDrive &lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;cmdlet. For the actual syntax, use command “get-help Compress-VirtualDiskDrive –detailed”. &lt;/SPAN&gt;&lt;/v:shapetype&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: SimSun; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-fareast; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"&gt;&lt;v:shapetype coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;&lt;SPAN style="COLOR: black"&gt;If your VHD is fixed type instead of “dynamic” type, you can convert it to dynamic type first, and then compress it. The conversion of the disk type can be done in the same UI or by using cmdlet “Convert-VirtualDiskDrive”.&lt;A href="http://blogs.technet.com/photos/chengw/picture3177529.aspx" target=_blank mce_href="http://blogs.technet.com/photos/chengw/picture3177529.aspx"&gt;&lt;IMG src="http://blogs.technet.com/photos/chengw/images/3177529/456x480.aspx" border=0 mce_src="http://blogs.technet.com/photos/chengw/images/3177529/456x480.aspx"&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/v:shapetype&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: SimSun; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-fareast; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"&gt;&lt;v:shapetype coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;&lt;SPAN style="COLOR: black"&gt;&lt;/SPAN&gt;&lt;/v:shapetype&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: 'Calibri','sans-serif'; mso-fareast-font-family: SimSun; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-theme-font: minor-fareast; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"&gt;&lt;v:shapetype coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;&lt;SPAN style="COLOR: black"&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: black"&gt;Thanks for reading and hope this helps.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;v:stroke joinstyle="miter"&gt;&lt;/v:stroke&gt;&lt;v:formulas&gt;&lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @0 1 0"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum 0 0 @1"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @2 1 2"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @3 21600 pixelWidth"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @3 21600 pixelHeight"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @0 0 1"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @6 1 2"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @7 21600 pixelWidth"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @8 21600 0"&gt;&lt;/v:f&gt;&lt;v:f eqn="prod @7 21600 pixelHeight"&gt;&lt;/v:f&gt;&lt;v:f eqn="sum @10 21600 0"&gt;&lt;/v:f&gt;&lt;/v:formulas&gt;&lt;v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"&gt;&lt;/v:path&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:lock v:ext="edit" aspectratio="t"&gt;Cheers,&lt;BR&gt;&lt;/o:lock&gt;&lt;o:lock v:ext="edit" aspectratio="t"&gt;Cheng&lt;/o:lock&gt;&lt;/v:shapetype&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3177537" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/chengw/archive/tags/SCVMM/default.aspx">SCVMM</category><category domain="http://blogs.technet.com/chengw/archive/tags/VHD/default.aspx">VHD</category></item></channel></rss>