<?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>The Soul of a Virtual Machine : Virtual Disks</title><link>http://blogs.technet.com/megand/archive/tags/Virtual+Disks/default.aspx</link><description>Tags: Virtual Disks</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Dealing with a VHD that grew too large</title><link>http://blogs.technet.com/megand/archive/2005/05/13/404890.aspx</link><pubDate>Fri, 13 May 2005 22:29:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:404890</guid><dc:creator>megand</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.technet.com/megand/comments/404890.aspx</comments><wfw:commentRss>http://blogs.technet.com/megand/commentrss.aspx?PostID=404890</wfw:commentRss><description>&lt;P&gt;Q: Lach writes with this question: "I have 2 virtual machines installed, and had them set up as dynamic hard drives [dynamically expanding VHDs]. One has gotten to 16 gb, and has all but filled up my hard drive. I would like to make it smaller, as the hard drive is only 1/2 used. Any advice?"&lt;/P&gt;
&lt;P&gt;A: Lach, you need to compact your VHD. First, delete as much unneeded data as possible from the VHD and defragment the hard disk. Then follow the instructions in "Compacting a dynamically expanding virtual hard disk" in the &lt;EM&gt;Virtual Server 2005 Administrator's Guide&lt;/EM&gt;. As mentioned in this topic,&amp;nbsp;you must precompact the VHD before you can compact it.&amp;nbsp;A Microsoft tool, the Virtual Disk Precompactor, is now available for this purpose. For more information, see &lt;a href="http://blogs.technet.com/megand/archive/2004/12/10/279808.aspx"&gt;http://blogs.technet.com/megand/archive/2004/12/10/279808.aspx&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Another thing you can do when a VHD outgrows a physical disk is to move the VHD to a different physical disk that has more space. When you do this, you must first remove the VHD from your virtual machine, move it,&amp;nbsp;and then add back to the virtual machine from the new location. In addition, if the physical disk is not located on the same physical computer as the virtual machine, you'll&amp;nbsp;need to do some additional configuration. For more information, see &lt;a href="http://blogs.technet.com/megand/archive/1005/05/11/404846.aspx"&gt;http://blogs.technet.com/megand/archive/1005/05/11/404846.aspx&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;For future reference, remember to specify the maximum size to which you want your dynamically expanding VHDs to grow when you create them. The default size is 16 GB.&lt;/P&gt;
&lt;P&gt;Note: I just read a blog post by Guoqiang Wu that recommends using a defragmenting tool created by Dave Whitney&amp;nbsp;rather than the one included with Windows. For more info on the tool, go to &lt;A title=http://blogs.msdn.com/guowu/archive/2005/05/17/418457.aspx href="http://blogs.msdn.com/guowu/archive/2005/05/17/418457.aspx"&gt;http://blogs.msdn.com/guowu/archive/2005/05/17/418457.aspx&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=404890" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/megand/archive/tags/Virtual+Disks/default.aspx">Virtual Disks</category></item><item><title>Increasing the size of a VHD</title><link>http://blogs.technet.com/megand/archive/2005/05/12/404883.aspx</link><pubDate>Thu, 12 May 2005 21:41:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:404883</guid><dc:creator>megand</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.technet.com/megand/comments/404883.aspx</comments><wfw:commentRss>http://blogs.technet.com/megand/commentrss.aspx?PostID=404883</wfw:commentRss><description>&lt;P&gt;Q: Haileyesus asks, "How do you increase the size of a virtual hard disk?"&lt;/P&gt;
&lt;P&gt;A: Unfortunately, Haileyesus, there's no way to increase the size of a virtual hard disk (VHD) once it's been created. VHDs are just like physical disks in this respect (and in most others, as well). If you need more space on your VHD, you'll need to create a new, larger .vhd file and then&amp;nbsp;transfer your data to it. There are a couple of approaches you can take to transfer data, depending on whether the VHD contains a system partition. (Alternatively, you can attach an additional VHD to your virtual machine to add data storage capacity.)&lt;/P&gt;
&lt;P&gt;1. If the VHD contains data with no operating system or installed applications, then you only need to copy the data to the new .vhd, as follows.&lt;/P&gt;
&lt;P&gt;&lt;FONT style="BACKGROUND-COLOR: #ffffff"&gt;&lt;STRONG&gt;Method A&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Shut down any services that are using the data on the .vhd. 
&lt;LI&gt;Create a .vhd that is the the size you want. 
&lt;LI&gt;Add the .vhd to a virtual machine that is running a bootable operating system, so that you have file access to the .vhd. 
&lt;LI&gt;From within the guest operating system, format the .vhd using the same format as the original .vhd. 
&lt;LI&gt;Use a file copy tool like XCOPY or ROBOCOPY to copy the data to the .vhd with ACLs attached. 
&lt;LI&gt;Remove both the original and the new .vhds from their respective virtual machines. 
&lt;LI&gt;Add the new .vhd to the original virtual machine.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;Method B&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Shut down any services that are using the data on the .vhd. 
&lt;LI&gt;Create a .vhd that is the size you want and in the same format. 
&lt;LI&gt;Add the .vhd to a virtual machine that is running a bootable operating system, so that you have file access to the .vhd. 
&lt;LI&gt;Use an imaging tool to image the original .vhd to a network location. 
&lt;LI&gt;Use the imaging tool to restore the image to the new .vhd. 
&lt;LI&gt;Remove both the original and the new .vhds from their respective virtual machines. 
&lt;LI&gt;Add the new .vhd to the original virtual machine.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;2. If the VHD&amp;nbsp;includes an operating system and/or installed applications, you'll need to to this:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create an image of the .vhd using a disk imaging tool (such as Ghost). 
&lt;LI&gt;Turn off the virtual machine and remove the .vhd that you just imaged. (Note that you will not be able to run a virtual machine with this .vhd attached at the same time as you run a virtual machine with the new .vhd attached. If you want to be able to do this, then you should SysPrep the .vhd before you image it. See my Sysprep article at&amp;nbsp;&lt;a href="http://blogs.technet.com/megand/articles/357570.aspx"&gt;http://blogs.technet.com/megand/articles/357570.aspx&lt;/A&gt; for more information.) 
&lt;LI&gt;Create a new .vhd file of the size you want and attach it to your virtual machine. 
&lt;LI&gt;Use the imaging tool to image the new .vhd. &lt;/LI&gt;&lt;/OL&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=404883" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/megand/archive/tags/Virtual+Disks/default.aspx">Virtual Disks</category></item></channel></rss>