Automation · Hyper-V Automation
Host Configuration
Cheat sheet · https://pcornel.dk/topic.php?topic=5710
Answer
Hyper-V host configuration automation sets up hosts with Install-WindowsFeature Hyper-V, Set-VMHost for default paths and migration settings, NUMA spanning and live migration networks.
Remember
- Install the role and management tools.
- Set default VM and VHDX paths.
- Configure live migration networks.
First checks
Get-VMHost | fl VirtualMachinePath,VirtualHardDiskPath,MaximumVirtualMachineMigrations— settingsSet-VMHost -VirtualMachinePath D:\VMs -WhatIf— preview- DSC/HyperVDsc for host config — declarative
Commands
Get-VMHost | Format-List *- Read-only/validation observation for Hyper-V host defaults, paths, migration/resource-metering and host capability sett…
Verify in this order
desired host settings → apply → verify
Where it usually breaks
Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5710