Everyday Virtualization

Change Hyper-V Path for VMs, Configuration

When it comes to Hyper-V VMs, there are a lot of things set as default. This is specifically the case when it comes to provisioning new VMs. Each Hyper-V host (especially when set up in standalone mode without System Center Virtual Machine Manager, or VMM) is subject to its own configuration, and that's generally a world of defaults.

With Hyper-V on Windows Server 2012, there are two main aspects (related to storage) where VMs reside: hard disks and their configuration. Both are important, but the virtual disk configuration will represent the bulk of the storage requirement both in terms of IOPS and storage space. By default, Hyper-V puts these locations on the C:\ drive in the following locations:

-C:\Users\Public\Documents\Hyper-V\­Virtual Hard Disks

These two locations are fine for standalone installations, but if you find that you're provisioning SAN volumes (with or without VMM), you'll want to change this. This property is set on the Hyper-V server itself. This is the difference between changing it each time you deploy a VM versus having the server place new VMs in the correct location as a default.

It's also important to note that as you go through the steps in the wizard, there are two options that will place the VM in non-default locations ("Name and Location" and "Connect Virtual Hard Disks" options of the new VM wizard menu). This underscores the importance of setting default locations at the server level to ensure your VMs and their relevant configurations are stored in the correct location.

You can set both of these options in Hyper-V Manager, as a property of the server itself. Do this by right-clicking on the server (host name) and selecting Hyper-V Settings, then changing both the path for Virtual Hard Disks and the path for Virtual Machines (see Figure 1).

[Click on image for larger view.] Figure 1. The default paths are configured within Hyper-V Manager.

This is one of those small steps that can make a potentially big difference in your overall architecture for Hyper-V. For small installations that leverage direct-attached storage (DAS), drive partitioning may be a reason to change this behavior. Also, for any environment with a SAN, this is a must.

About the Author

Rick Vanover (Cisco Champion, Microsoft MVP, VMware vExpert) is based in Columbus, Ohio. Vanover's experience includes systems administration and IT management, with virtualization, cloud and storage technologies being the central theme of his career recently. Follow him on Twitter @RickVanover.


Subscribe on YouTube