none
Hyper-V Virtual Machines: Where To Store It's Component Parts (Config, Snapshots, VHDs, Smart Paging)?

    Question

  • Hi guys, 

    I've been testing Hyper-V on Windows Server 2012 for the last three weeks, and though I've searched thoroughly on the topic I cant find a "best practice" guide for where to store the virtual machines.. Most people generally say "Dont store the virtual machines on the same hard disk as the system files", but nobody gives a guide on what exactly to do with the four components of the virtual machines. 

    When you first install Hyper-V, the four components of the virtual machine (namely the VHD, the configuration, the snapshots and the smart paging) are put in Hyper-V's own default folders on the C: partition. What I have found myself doing is creating the new virtual machine using the default paths, and then when the virtual machine is up and running, use the Move command in Hyper-V Manager to move all four components of the virtual machine to it's OWN folder on the D:\Virtual Machines\<computer_name>\ on the second hard disk... But this seems like an extra unnecessary step. 

    So my questions would be: 

    1. Is it okay to store all four components of each virtual machine in it's own folder on a second (non system) hard disk, or is there some reason against doing this? Surely people dont just leave the config and VHDs sit in different folders on the C: partition?

    2. Is it possible to set up the default paths to do this for me when I initially create the virtual machine, instead of me having to create THEN move each virtual machine? 

    Hope that my questions are clear. 

    thanks, 

    Jonathan. 


    Thursday, July 04, 2013 2:14 AM

Answers

  • Hi Jonathan,

    1. It is definitly ok.

    2. Yes, you can change the default paths for the files. For this, go to the Hyper-V Settings in your Host and modify the path for the Virtual Hard Disks and Virtual Machines. This will also change the path for Snapshots and the Memory. For example D:\

    Usually I am doing the following upon creating the VM (default path D:\):

    - Create the VM without VHDx and store it in D:\ (it will create a folder with the VM name on the drive)
    - Create the VHDx in the same folder and attach it to the VM

    I am creating the VHDx later, as I do not want to use dynamic VHDxs which is the only option in the create VM wizard.

    Best Regards,
    Jens


    jensit.wordpress.com

    • Marked as answer by JonathanAnon Friday, July 05, 2013 1:08 AM
    Thursday, July 04, 2013 6:25 PM

All replies

  • Hi guys, 

    I've been testing Hyper-V on Windows Server 2012 for the last three weeks, and though I've searched thoroughly on the topic I cant find a "best practice" guide for where to store the virtual machines.. Most people generally say "Dont store the virtual machines on the same hard disk as the system files", but nobody gives a guide on what exactly to do with the four components of the virtual machines. 

    When you first install Hyper-V, the four components of the virtual machine (namely the VHD, the configuration, the snapshots and the smart paging) are put in Hyper-V's own default folders on the C: partition. What I have found myself doing is creating the new virtual machine using the default paths, and then when the virtual machine is up and running, use the Move command in Hyper-V Manager to move all four components of the virtual machine to it's OWN folder on the D:\Virtual Machines\<computer_name>\ on the second hard disk... But this seems like an extra unnecessary step. 

    So my questions would be: 

    1. Is it okay to store all four components of each virtual machine in it's own folder on a second (non system) hard disk, or is there some reason against doing this? Surely people dont just leave the config and VHDs sit in different folders on the C: partition?

    2. Is it possible to set up the default paths to do this for me when I initially create the virtual machine, instead of me having to create THEN move each virtual machine? 

    Hope that my questions are clear. 

    thanks, 

    Jonathan. 


    Directory structure does not matter. RAID configuration to give enough IOPS to power your VMs however does. For a home use you may store and boot them from your C: drive just fine. 

    StarWind iSCSI SAN & NAS

    Thursday, July 04, 2013 9:37 AM
  • Hi Jonathan,

    1. It is definitly ok.

    2. Yes, you can change the default paths for the files. For this, go to the Hyper-V Settings in your Host and modify the path for the Virtual Hard Disks and Virtual Machines. This will also change the path for Snapshots and the Memory. For example D:\

    Usually I am doing the following upon creating the VM (default path D:\):

    - Create the VM without VHDx and store it in D:\ (it will create a folder with the VM name on the drive)
    - Create the VHDx in the same folder and attach it to the VM

    I am creating the VHDx later, as I do not want to use dynamic VHDxs which is the only option in the create VM wizard.

    Best Regards,
    Jens


    jensit.wordpress.com

    • Marked as answer by JonathanAnon Friday, July 05, 2013 1:08 AM
    Thursday, July 04, 2013 6:25 PM
  • Hi Jens, 

    Thanks for your response. I was just about to correct you about not having the option to choose fixed disk when creating virtual machines, until I went through my own setup documents and discovered that you are right. I completely missed this. It seems that you have the option to choose dynamic/fixed/differencing when ADDING a new disk to an existing virtual machine, but not when CREATING a virtual machine. This seems very non-intuitive.

    I was just listening to an interview with Aidan Finn talking about Hyper-V and he says to always uses fixed disks for virtual machines. It's sort of odd that they dont give you the option of choosing fixed/dynamic at this point in the installation. But I will certainly change my documentation to reflect this. 

    thanks, 

    J

    Thursday, July 04, 2013 6:51 PM
  • Hi Jonathan,

    I agree, somehow Microsoft did miss this...

    For productive environments you should always use fixed disks, not only because of the performance. Other possible problems are overcommittment of the disk space due to the growing VHDs.

    Instead for labs, dynamic or differencing disks can be used usually.
    In case you need any help or information, just let me know ;-)

    Best Regards,
    Jens


    jensit.wordpress.com

    Thursday, July 04, 2013 8:46 PM