<p>Hey everyone, I'm using Virtual PC and working with a virtual hard disk (*.vhd) that is only sized at 8.2 GB. I would like to double the size to something like 16-20GB. I see options for compacting the VHD but nothing to expand it. It's set to "dynamically expand" but I'm installing some software and it doesn't seem to resize itself to a larger space.</p>

<p>Thanks much.</p>

[{'answer_id': 28957, 'author': 'Iker Jimenez', 'author_id': 2697, 'author_profile': 'https://Stackoverflow.com/users/2697', 'pm_score': 0, 'selected': False, 'text': "<p>Never worked with Virtual PC but from other virtualization software I know I guess that dynamically expand means that initially the .vhd file will take less space in the HD than the specified and will dynamically grow as you keep installing programs or adding files into the virtual drive UP TO the specified size.</p>\n\n<p>For what you want I guess that you will have to modify the specified size in the virtual hard drive from Virtual PC's setup window.</p>\n\n<p>A bit offtopic but give a go to Virtual Box: www.virtualbox.org</p>\n"}, {'answer_id': 28963, 'author': 'Chris', 'author_id': 2134, 'author_profile': 'https://Stackoverflow.com/users/2134', 'pm_score': 2, 'selected': True, 'text': '<p><a href="http://vmtoolkit.com/files/folders/converters/entry87.aspx" rel="nofollow noreferrer">VHD Resizer</a></p>\n'}, {'answer_id': 41038, 'author': 'Ferruccio', 'author_id': 4086, 'author_profile': 'https://Stackoverflow.com/users/4086', 'pm_score': 0, 'selected': False, 'text': '<p>For vmware users, you can download a free edition of <a href="http://www.vmware.com/products/converter/" rel="nofollow noreferrer">vmware converter</a> which not only lets you resize virtual disks but also lets you convert from physical to virtual machines and vice-versa.</p>\n'}, {'answer_id': 553425, 'author': 'uli78', 'author_id': 61434, 'author_profile': 'https://Stackoverflow.com/users/61434', 'pm_score': 0, 'selected': False, 'text': '<p>Here is a solution that worked for me:\nUse "CopyWipe" or a similar software to make a hardcopy to a new vhd, as described here:</p>\n\n<p><a href="http://www.cosky.com/expanding_a_virtual_pc_vhd" rel="nofollow noreferrer">Eric Cosky</a></p>\n'}, {'answer_id': 661248, 'author': 'Paul Rowland', 'author_id': 6268, 'author_profile': 'https://Stackoverflow.com/users/6268', 'pm_score': 2, 'selected': False, 'text': '<p><a href="http://par2008.blogspot.com/2009/03/increase-size-of-your-microsoft-virtual.html" rel="nofollow noreferrer">Heres my solution</a>, using VHDResizer and DISKPART on a Windows XP host.</p>\n\n<p><ol><li>Download VHDResizer from <a href="http://vmtoolkit.com/files/folders/converters/entry87.aspx" rel="nofollow noreferrer">here</a></li><li>Following these instructions from "Murnic" on this <a href="http://vmtoolkit.com/forums/thread/331.aspx" rel="nofollow noreferrer">thread</a> didnt work, on entering EXTEND, not sure on the exact wording now, but it was along the lines of cant extend this volume.\n</li></ol><p></p><blockquote><p>The easiest way to do this (as long as you have enough hard drive space) is to extend your existing VHD using VHD Expander which gives you two VHD files. The newly extended file will take the name of your existing VHD. You might want to Defragment, Precompact, and Compact your VHD prior to extending your VHD.</p> <p>In Virtual PC 2007 go to Settings.</p> <ul><li>Select your <strong>OLD</strong> VHD as Hard Disk 1</li><li>Select your newly extended VHD as Hard Disk 2</li><li>Boot your VM</li><li>Open an Command Prompt</li><li>Run diskpart</li><li>From DISKPART>\n- Execute LIST VOLUME\n- Select your new VHD volume by executing SELECT VOLUME  where  is your new VHD most likely 2\n- Execute EXTEND\n- You should see a success message.  If not you may have to recreate your extended VHD due to an error in the process.</li><li>Quit Diskpart.exe by typing EXIT</li><li>Shut Down the VM</li><li>Remove both VHD files from the Hard Disks list</li><li>Add your newly extended VHD as Hard Disk 1</li><li>Boot your VM.</li><li>You will get a Windows Newly Added Hardware message after a short time.</li><li>Reboot the VM when prompted</li><li>Start using your newly extended VHD!</li></ul> <p>Here is Microsoft\'s information on extending volumes using Diskpart.exe:  <a href="http://support.microsoft.com/kb/325590" rel="nofollow noreferrer"><a href="http://support.microsoft.com/kb/325590" rel="nofollow noreferrer">http://support.microsoft.com/kb/325590</a></a></p></blockquote><p><a href="http://support.microsoft.com/kb/325590" rel="nofollow noreferrer"></a></p><p>\n</p></p>\n\n<p>So I went back to these instructions from \'AutoSponge\' at the start of the same thread,</p>\n\n<p>Mount the image </p>\n\n<ol>\n<li>C:>Program Files\\Microsoft Virtual Server\\Vhdmount>vhdmount /m “C:Documents and Settings\\All Users\\Documents\\Shared Virtual Machines\\.vhd”  </li>\n<li><p>Start diskpart and expand the partition</p>\n\n<p>C:>Program Files\\Microsoft Virtual Server\\Vhdmount>diskpart</p>\n\n<p>DISKPART>list disk </p>\n\n<p>DISKPART>select disk 3 -----check the number in the list </p>\n\n<p>DISKPART>list part </p>\n\n<p>DISKPART>select part 1 -----check the number in the list </p>\n\n<p>DISKPART>extend DISKPART>list part -----check the new size</p>\n\n<p>DISKPART>exit </p></li>\n<li><p>Dismount and save changes </p>\n\n<p>C:>Program Files\\Microsoft Virtual Server\\Vhdmount>vhdmount /u /c “C:Documents and Settings\\All Users\\Documents\\Shared Virtual Machines\\.vhd”</p></li>\n</ol>\n\n<p>You can get download <a href="http://www.microsoft.com/downloads/details.aspx?familyid=bc49c7c8-4840-4e67-8dc4-1e6e218acce4&amp;displaylang=en&amp;Hash=bRgN%2bdbbJlcJDX3z8qu7WeSFOxk9UsQe667C0MNaz%2beOZU2grT74dtPNgGDgqbiLXvgaYyBz63DZkWE4amRqxw%3d%3d" rel="nofollow noreferrer">Microsoft Virtual Server here</a>.\nYou can do a custom install and only select VHDMount</p>\n\n<p>Some more information<a href="http://www.petri.co.il/mounting-vhd-files-with-vhdmount.htm" rel="nofollow noreferrer"> using VHDMount</a></p>\n\n<p>Using <a href="http://blogs.msdn.com/virtual_pc_guy/archive/2006/09/05/740763.aspx" rel="nofollow noreferrer">VHDMount with Windows XP</a> - \n<blockquote>It is not possible to use \'/m\' (Mount), you can only use \'/p\' (Plug in).</p>\n\n<p>The reason for this is that VHDMount uses VDS (the Virtual Disk Service) to assign a disk letter to the virtual hard disk after it is mounted, but VDS is only included in Windows Server 2003 and later.  This is not too big of an issue though, as unlike Windows Server 2003, Windows XP will automatically mount the virtual hard disk when it is plugged in.  This means that the only functionality you lose on Windows XP is the ability to specify exactly which drive letter should be used.</blockquote>                     <blockquote><p>\n</p></blockquote>                       </p>\n'}, {'answer_id': 2722857, 'author': 'Clay Nichols', 'author_id': 4906, 'author_profile': 'https://Stackoverflow.com/users/4906', 'pm_score': 0, 'selected': False, 'text': '<p>I found it easier, simpler and safer to just create a second VHD and install my Big Software to that HD.</p>\n'}, {'answer_id': 12078818, 'author': 'Ziad', 'author_id': 144227, 'author_profile': 'https://Stackoverflow.com/users/144227', 'pm_score': 0, 'selected': False, 'text': '<p>First detach the VHD then run those commands to expand your disk:</p>\n\n<ol>\n    <li>diskpart\n    </li>\n    <li>Select vdisk file="Your Path"\n    </li>\n    <li>list vdisk\n    </li>\n    <li>expand vdisk maximum=new size in MB\n    </li>\n    <li>attach vdisk\n    </li>\n    <li>list disk\n    </li>\n    <li>online Disk\n    </li>\n    <li>list volume\n    </li>\n    <li>select volume #\n    </li>\n    <li>extend\n    </li>\n    <li>list Volume \n    </li>\n    <li>detach vdisk    \n    </li>\n    <li>exit\n    </li>\n</ol>\n\n<p>And here\'s a brief description for what each line does:</p>\n\n<ol>\n    <li>Launch the DiskPart utity.  \n    </li>\n    <li>Select the VHD file.  Notice that if the path or the file name has spaces you have to put double quotes around it.  \n    </li>\n    <li>Shows you a list of Vdisks.  The * at the left shows the one that is selected.  \n    </li>\n    <li>Changes the size of the vdisk to our new size.\n    </li>\n    <li>Once the disk is expanded you have to mount it to work on the disk.  \n    </li>\n    <li>Shows the list of disks mounted disks and vDisks including ours. \n    </li>\n    <li>If disk is not showing online you will need to bring it online. \n    </li>\n    <li>List volumes(partitions). The ### column is the most important since it has the number you need to use to select the volume you will work with.\n    </li>\n    <li>Select the volume we want to work with.\n    </li>\n    <li>Extends the currently selected volume to use all contiguous available space on the same disk.   \n    </li>\n    <li>Running again to show the new size.\n    </li>\n    <li>Dismounts the Vdisk volume so that Hyper-V can load it.\n    </li>\n    <li>Exit diskpart utity.    \n    </li>\n</ol>\n\n<p>However I give no guarantee this will work for everyone so <strong>keep the original around until you complete the process</strong>, just in case.</p>\n'}]
['https://Stackoverflow.com/questions/28946', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/64/']