When running Microsoft Hyper-V on Windows 11 workstations or management hypervisors, newly provisioned virtual machines and virtual hard disks default to system directories situated on the primary OS drive (typically under %ProgramData%\Microsoft\Windows\Hyper-V and %Users%\Public\Documents\Hyper-V). In enterprise environments and developer setups, storing large virtual disks on the primary boot volume quickly exhausts system drive space, causes I/O contention with host OS files, and disrupts automated VM deployment pipelines. PowerShell provides the Set-VMHost cmdlet, an administrative tool that configures global host-level hypervisor parameters across Windows 11.
Beyond redirecting default storage targets to dedicated high-speed NVMe or secondary SSD volumes, Set-VMHost controls non-uniform memory access (NUMA) spanning, live migration authentication, maximum simultaneous storage migrations, and Enhanced Session Mode policies across the entire hypervisor instance.
Understanding Hyper-V Host Architecture and PowerShell Cmdlets
The Hyper-V management model divides configuration into two distinct layers:
- Per-VM Settings: Configured using cmdlets like
Set-VM,Set-VMMemory, andSet-VMProcessor, targeting individual guest machines. - Host-Level Settings: Configured using
Set-VMHostand queried usingGet-VMHost. These parameters define the default operating baseline for all virtual machines created on the machine, as well as global hypervisor behavior.
Key parameters managed by Set-VMHost include:
VirtualHardDiskPath: The default filesystem directory where new.vhdxcontainers are created when no custom path is provided.VirtualMachinePath: The global folder where virtual machine configuration state files, snapshots, and runtime state dumps reside.NumaSpanningEnabled: Determines whether the hypervisor permits virtual machines to span non-contiguous NUMA memory nodes.EnhancedSessionModePolicy: Governs whether client connections can leverage RDP-based drive redirection, audio pass-through, and clipboard sharing.
Inspecting Current Hyper-V Host Configuration
Launch an elevated PowerShell console on Windows 11 and examine the existing host settings:
# Query current Hyper-V host baseline configuration
Get-VMHost | Format-List -Property `
FullyQualifiedDomainName, VirtualHardDiskPath, VirtualMachinePath, `
NumaSpanningEnabled, EnableEnhancedSessionMode, `
VirtualMachineMigrationEnabled, MaximumVirtualMachineMigrations
Notice that by default, both VirtualHardDiskPath and VirtualMachinePath point to local paths on drive C:. On developer machines, this can lead to unexpected storage exhaustion during large testing runs.
Re-routing Default Storage Paths to Dedicated Volumes
To ensure high I/O throughput and prevent host drive saturation, redirect default VM storage and virtual hard disk paths to a dedicated high-capacity storage volume (such as D:\Hyper-V\Disks and D:\Hyper-V\Configuration).
Create the designated folder hierarchies and apply the new global paths:
# Create dedicated storage directories
New-Item -ItemType Directory -Path "D:\Hyper-V\Virtual Hard Disks" -Force
New-Item -ItemType Directory -Path "D:\Hyper-V\Virtual Machines" -Force
# Reconfigure default hypervisor host storage paths
Set-VMHost -VirtualHardDiskPath "D:\Hyper-V\Virtual Hard Disks" `
-VirtualMachinePath "D:\Hyper-V\Virtual Machines"
Once set, any virtual machine created via the Hyper-V GUI, Windows Sandbox, or New-VM automatically stores its disks and configuration tables in the specified directories without requiring manual path overrides.
Configuring Host NUMA Spanning and Memory Allocation
On high-core multi-socket workstations or multi-die processors (such as AMD Ryzen Threadripper or Intel Xeon systems), NUMA spanning controls how guest memory is distributed:
- NUMA Spanning Enabled (Default): Allows a single virtual machine to allocate memory across multiple physical NUMA nodes. While this permits VMs to consume more RAM than exists on a single node, cross-node memory access increases latency.
- NUMA Spanning Disabled: Restricts VMs to physical NUMA node boundaries. This guarantees maximum memory bandwidth and deterministic access speeds, which is essential for low-latency testing and compilation workloads.
To disable NUMA spanning for consistent high-performance memory execution:
# Disable host NUMA spanning
Set-VMHost -NumaSpanningEnabled $False
Note that disabling NUMA spanning requires a host reboot or a restart of the vmms (Hyper-V Virtual Machine Management) service to take full effect on running partitions.
Managing Enhanced Session Mode Host Policies
Enhanced Session Mode bridges the Hyper-V Virtual Machine Connection (VMConnect) with Remote Desktop protocol extensions over the VMBus, enabling bidirectional clipboard sharing, local disk pass-through, smart card authentication, and dynamic display resizing.
To enforce or disable Enhanced Session Mode at the hypervisor host level:
# Enable host-wide Enhanced Session Mode policy
Set-VMHost -EnableEnhancedSessionMode $True
In secure enterprise testing environments where data exfiltration prevention is mandated, setting -EnableEnhancedSessionMode $False globally disables host drive redirection and clipboard access into guest VMs.
Tuning Storage and Virtual Machine Migration Limits
When Windows 11 workstations participate in migration clusters or staging pools, throttle simultaneous migration operations to prevent saturating local network links or storage buses:
# Configure maximum concurrent virtual machine and storage migrations
Set-VMHost -MaximumVirtualMachineMigrations 2 `
-MaximumStorageMigrations 2
Verifying and Committing Host Changes
Verify that all modifications have been applied cleanly to the hypervisor host instance:
# Validate updated host settings
Get-VMHost | Select-Object VirtualHardDiskPath, VirtualMachinePath, NumaSpanningEnabled, EnableEnhancedSessionMode
By standardising host storage paths and hypervisor execution policies using Set-VMHost, system administrators maintain clean disk organisation and ensure deterministic virtual machine performance across Windows 11 environments.