
close
close
Chance to win $250 in Petri 2023 Audience Survey
In my travels, I have noticed that the default storage paths used by Hyper-V can cause some confusion. To be honest, I don’t like how Hyper-V stores virtual machines by default; System Center Virtual Machine Manager (SCVMM) handles the folder structure in a much more attractive fashion. In this post, I will explain where Hyper-V stores virtual machine files by default, and how you can manipulate those settings to get a better configuration.
There are two default storage paths defined in each host’s Hyper-V settings. You can find and edit these paths by opening Hyper-V Manager, connecting to and selecting your host, and choosing Hyper-V Settings from Actions. Here you will find two settings.
Virtual Hard Disks is the default storage location for any new virtual hard disk that you create. The default location is C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks. Checkpoints (AVHD or AVHDX files) will also be stored in this location.
Virtual Machines is where the XML file (named after the GUID of the virtual machine) for a virtual machine configuration will be stored. The default location for those XML files is C:\ProgramData\Microsoft\Windows\Hyper-V. BIN files (to reserve space for virtual machines that will enter a saved state when a host shuts down) and VSV files (a saved state) are stored in a subfolder that is named after the GUID of the virtual machine.
When you think about it, both of those locations are pretty dumb. On a nonclustered host, you should never store virtual machines on the system drive. And who thinks it’s a good idea to bury virtual machine and virtual hard disks in program and profile folders?
Once in a while I will visit a site and find that all of their virtual machine XML and virtual hard disk files are in a single folder and a rather untidy flat file structure. It takes some time to figure out what XML file is associate with what virtual machine, and the file is named after the GUID of the virtual machine. I would not classify myself as a clean freak, but I cannot stand this layout. And it really annoys me that Hyper-V steers you into this direction.
The below screenshot is taken from the New Virtual Machine Wizard in Hyper-V Manager. An administrator will enter the name of the new virtual machine. If they do not check the Store The Virtual Machine in a Different Location box, then they get a rather untidy collection of files.
You can prevent this mess if you check the Store The Virtual Machine in a Different Location box in the New Virtual Machine Wizard. All you have to do is check that box, and the wizard will create a subfolder, named after the virtual machine, to store all of that virtual machines files. If you create 10 virtual machines, then you get 10 subfolders in the Virtual Machine path that is configured in Hyper-V Settings.
More in Hyper-V
Leveraging Virtualization for Improved Availability and Disaster Recovery
Apr 29, 2019 | Michael Otey
Most popular on petri