How to change the default directory for hosting Hyper-V virtual machines in Windows 10
As we know, Hyper-V allows running virtual computer systems on a physical server. These virtualization systems (also known as guest clients) can be used and managed similarly as physical computer systems.
General information
As we know, Hyper-V allows running virtual computer systems on a physical server.These virtualization systems (also known as guest clients) can be used and managed similarly as physical computer systems, but in essence, they still exist in the environment. virtualization and isolation.
A virtual machine in Hyper-V includes several files that store its virtual hardware configuration and virtual storage (VHD and VHDX files).
- Virtual machine configuration files are stored in "C: ProgramDataMicrosoftWindowsHyper-V".
- Virtual hard drives are stored in "C: UsersPublic DocumentsHyper-VVirtual Hard Disk".
When you create a virtual machine in Hyper-V Manager, you can choose to use these default locations or just reposition the folder location on each virtual machine.
If you like, you can change these default locations within your server to easily use the location you set by default when creating a new virtual machine.
This article will show you how to set up the default directory to store virtual machine configuration files when importing or creating a new Hyper-V virtual machine in Windows 10.
Note that you must log on to the system as an administrator to change the default directory for Hyper-V virtual machine configuration files.
Example: Hyper-V virtual machine directory
Change the default Hyper-V virtual machine directory using the Hyper-V Manager
1. Open Hyper-V Manager
2. Select the Hyper-V server to which you want to change the default directory to store Hyper-V virtual machines there (for example: "BRINK-DESKTOP") in the left pane, and click the Hyper-V entry. Settings in the action pane on the right (see screenshot below).
3. Click on Virtual Machines in the left pane, then click the Browse button in the right window, navigate to and select the folder you want to use, click Select Folder and click OK (see screenshot side) below).
4. When finished, you can close the Hyper-V Manager if you wish.
Change the default Hyper-V virtual machine directory using PowerShell
1. Open PowerShell
2. Type the following command in PowerShell and press Enter (see screenshot below).
(Existing Hyper-V server)
Set-VMHost - VirtualMachinePath ' full path of directory '
(Specific Hyper-V server)
Set-VMHost -ComputerName ' Hyper-V server name -VirtualMachinePath' full path of directory '
Note
Replace the ' full path of the directory ' in the above commands with the actual full path of the directory in which you want to store Hyper-V virtual machine configuration files in it.
Replace the ' Hyper-V server name ' in the second command above with the actual host name you want to change the default virtual machine directory (eg "BRINK-DESKTOP").
For example:
Set-VMHost - VirtualMachinePath ' D: Virtual Machines '
Or:
Set-VMHost -ComputerName ' BRINK-DESKTOP ' -VirtualMachinePath ' D: Virtual Machines '
3. Once done, you can close PowerShell if you want.
See more:
- How to create and use Hyper-V checkpoints in Windows 10
- How to import Hyper-V virtual machines in Windows 10
- How to export Hyper-V virtual machines in Windows 10
- Setting up Ubuntu virtual machine with Hyper-V Quick Create on Windows 10
You should read it
- How to Tune a Java Virtual Machine (JVM)
- 5 best virtual machines for Windows 11 PCs
- Monitor Hyper-V with the command line (Part 3): Check virtual machine status
- How to export Hyper-V virtual machines in Windows 10
- How to import Hyper-V virtual machines in Windows 10
- Instructions for fixing errors do not install VMware Tools
- Steps to install windows 11 on virtual machine, how to install windows 11 on VMware
- Collect the Process ID information or GUID of Hyper-V Virtual Machine
- Stealing virtual machines and virtual machine data
- Use the Virtual Machine Manager to quickly deploy Hyper-V
- How to create a Windows 10 virtual machine with VMware Player and VirtualBox
- Setting up Ubuntu virtual machine with Hyper-V Quick Create on Windows 10
Maybe you are interested
Thousands of iOS apps could be at risk because of an open source vulnerability Rhodium - The most expensive metal in the world is 5 times more expensive than gold How to turn off auto screen brightness on Apple Watch Strange regulation series only in the US: Prohibiting beard when kissing women, whistling underwater is illegal How much does the flower pistil cost? Where to buy quality assurance? Effect of saffron pistil with health and beauty