none
Virtual Machines In Windows 2008 R2 Hard Drive Sizes RRS feed

  • Question

  • When you setup a New Virtual Machine in Windows 2008 R2 and you go with the Default settings for the hard drive file size which is i believe 129 GB or something close to that,

    does it grab 129 GB from your physical Hard drive or does

    Hyper -v some how will fill that much disk space eventually.

    meaning it is like a container it can fill 129 gb but it doesnt allocate it out right there is slowly

    starts grabbing that much disk space as you add software to that file you created for that VM.

    - martin enriquez


    Martin Enriquez TechNet Forums
    Tuesday, July 12, 2011 10:56 PM

Answers

  • That size WILL grow quickly though.  You have to make sure you set a few settings in your virtual Windows installations if you want to keep those files small.

    For example:

    - Give your virtual plenty of memory and you can set virtual memory on your virtual machine to 0.  In the old days if you were running out of physical memory it was use that swap space on the HDD.  Now adays if your virtual machine is running low on memory you simple shut it down and give it more in the Hyper-V manager.  With SP1 loaded it's even easier with the Dynamic Memory deature. 

      If virtual memory is set to auto it will make a swap file usualy equal to the amount of memory you assigned to the virtual machine.  2GB of memory assigned to a virtual machine tends to make your VHD 2GB larger

    - Turn off the Restore Point if you don't need it.  It will keep those restore point images in the VHD bloating the image.

     

    After I turn both those off I run a Compact on the VHD and tend to see 35GB VHDs with Win7 loaded in them drop to 15-20GB depending on the apps installed.

    Tuesday, July 19, 2011 12:24 PM

All replies

  • The default is a dynamically expanding VHD, which starts at about 256KB.  As you add/change data in the VHD, it grows until it reaches its maximum size.

    You can also choose to create a "fixed size" disk which creates and reserves the full size of the VHD.   This method is the preferred way to create VHDs for virtual machines in production use.

    Wednesday, July 13, 2011 2:23 AM
  • Thank you very much that's exactly what I needed to know.

    -martin


    Martin Enriquez TechNet Forums
    Wednesday, July 13, 2011 4:34 PM
  • That size WILL grow quickly though.  You have to make sure you set a few settings in your virtual Windows installations if you want to keep those files small.

    For example:

    - Give your virtual plenty of memory and you can set virtual memory on your virtual machine to 0.  In the old days if you were running out of physical memory it was use that swap space on the HDD.  Now adays if your virtual machine is running low on memory you simple shut it down and give it more in the Hyper-V manager.  With SP1 loaded it's even easier with the Dynamic Memory deature. 

      If virtual memory is set to auto it will make a swap file usualy equal to the amount of memory you assigned to the virtual machine.  2GB of memory assigned to a virtual machine tends to make your VHD 2GB larger

    - Turn off the Restore Point if you don't need it.  It will keep those restore point images in the VHD bloating the image.

     

    After I turn both those off I run a Compact on the VHD and tend to see 35GB VHDs with Win7 loaded in them drop to 15-20GB depending on the apps installed.

    Tuesday, July 19, 2011 12:24 PM