Windows Server 2025 / How to Adjust Hyper-V CPU, Memory, and VHDX Resources

Adjust VM resources against both host capacity and guest workload. Larger CPU, memory, or disk values do not automatically improve performance. Record original settings and compare one change at a time.

Separate host capacity from guest configuration

A vCPU is exposed to the guest, not necessarily a dedicated physical core. Memory can be fixed or dynamic; VHDX is a file presented as a disk. Host shortages or storage delays affect several guests.

Resource Host observation Guest observation
CPU Other VMs, configuration, and contention Workload CPU and response
Memory Available and assigned capacity Usage, paging, application needs
Storage Backing-file size, free space, latency Volume capacity, file system, free space

Use the empty HVTEST01, shut it down normally, and verify Off. This exercise does not rely on hot-change support. Recorded CPU and memory settings are reversible; shrinking data disks is not an equally simple rollback.

Compare CPU count with the same workload

Get-VM -Name 'HVTEST01' | Select-Object Name,State,ProcessorCount
Get-VMProcessor -VMName 'HVTEST01' | Select-Object Count,Reserve,Maximum,RelativeWeight
  1. Record the existing processor count.
  2. With the VM off, change only two vCPUs to one.
  3. Start and repeat the same bounded administrative task under comparable conditions.
  4. Record guest usage, time, and host background load.
  5. Shut down and restore two vCPUs.

A light task may show little difference. Do not turn one observation into a general performance ranking. Overallocating vCPUs across many guests can increase contention.

Choose fixed or dynamic memory deliberately

Dynamic memory adjusts within minimum, startup, and maximum values according to demand and host conditions. Maximum is not a guaranteed reservation. Check application support and real guest requirements. These 2/4/6 GB values are examples from Set-VMMemory:

Get-VMMemory -VMName 'HVTEST01' | Select-Object DynamicMemoryEnabled,Minimum,Startup,Maximum
Set-VMMemory -VMName 'HVTEST01' -DynamicMemoryEnabled $true -MinimumBytes 2GB -StartupBytes 4GB -MaximumBytes 6GB

Observe Hyper-V assigned memory and demand alongside guest paging and host free memory. Insufficient startup capacity can prevent boot. After the comparison, shut down and restore the original fixed 4 GB configuration if that was its prior state:

Set-VMMemory -VMName 'HVTEST01' -DynamicMemoryEnabled $false -StartupBytes 4GB

Inspect virtual capacity and backing-file growth

Fixed disks allocate their configured storage upfront; dynamic disks grow as data is written. Differencing disks depend on their parents, so preserve the chain. Dynamic growth still needs real free space.

Get-VMHardDiskDrive -VMName 'HVTEST01' | Select-Object ControllerType,ControllerNumber,ControllerLocation,Path
Get-VMHardDiskDrive -VMName 'HVTEST01' | ForEach-Object { Get-VHD -Path $_.Path } | Select-Object Path,VhdType,FileSize,Size,ParentPath

Size is guest-visible virtual capacity; FileSize is the host file’s size. Deleting guest files does not necessarily shrink the backing file immediately. Checkpoint AVHDX files and their parents also belong to this dependency model.

Separate adding a disk from extending a volume

  1. Shut down HVTEST01 and record the OS disk path.
  2. Add a new disk through the SCSI controller.
  3. Create a separate dynamic HVTEST01-Data.vhdx of 20 GB, not the existing OS disk.
  4. Start the guest and identify the new disk.
  5. Initialize only that verified new disk as GPT and create a volume using an available letter.

See VHD creation parameters. Expanding an existing disk requires checking backups, checkpoints, and controller conditions, then extending the guest partition too. A simple extension may require adjacent unallocated space.

Do not combine shrink, conversion, and forced detachment. Before removing the new data attachment, preserve its files and shut down. Detachment does not delete its VHDX; inspect other VM and differencing dependencies before any file deletion.