- Azure Sentinel—A real-world example - Tue, Oct 12 2021
- Deploying Windows Hello for Business - Wed, Aug 4 2021
- Azure Purview: Data governance for on-premises, multicloud, and SaaS data - Wed, Feb 17 2021
In the last post of this Hyper-V performance tuning series I discussed memory, storage and networking. Today I will list some well-known and some less well known tips and gotchas that will improve your experience with and performance of Hyper-V.
Integration components ^
Loading the (latest) integration components (IC) is the single most important step in optimizing performance. Check in Device Manager in the VM that Virtual Machine Bus shows up under System Devices, if it does the IC are loaded.
Guest OS ^
Use newer operating systems as guest OSs. In the physical world a rule of thumb is “if you’re going to run it on older hardware, run an older OS” which would tend to favour spinning up a Windows Server 2003 box rather than 2008 on a less powerful box. In the VM world the opposite applies, if you’re resource constrained on a host but you need a new VM go for the latest OS; it will work better in the virtual world.
Hyper-V Manager ^
Close Hyper-V Manager when you’re not using it; the monitoring of statistics cause unnecessary WMI activity in the parent partition and the thumbnails of the screens waste resources in both host and guest. Don’t use Virtual Machine Connection to manage VMs, use remote desktop sessions instead, the resource usage in the VMs will be lower.
Don’t run unnecessary services in the host partition, not only will you affect the performance of VMs but you may also be in an unsupported configuration. According to Microsoft you can only run management and backup agents in the parent partition; no other workloads.
Host OS ^
In a production environment Server Core or the free Hyper – V server are recommended as the host “OS” as they have less overhead (approximately 80 MB less commit charge); both also seriously limits the possibility of someone running unwanted applications in the parent.
Background CPU activity ^
Minimize background CPU activity in VMs by removing remove unused devices (COM ports), disable the screen saver and leave the VM at the logon screen when not in use. For client OS virtual machines in a VDI environment it’s best to disable SuperFetch and Windows Search as well as scheduled defragmentation. Remove the CD drive from VMs when possible, not just “no media” but actually remove it, otherwise Windows in the VM checks every one second to see if there’s media in the drive.
Subscribe to 4sysops newsletter!
Network configuration ^
Dedicate a 1 Gbps NIC for Live Migration in a cluster and avoid the legacy network adapter for all networks (unless you can’t because you need it for PXE booting or because the OS doesn’t support Integration Components). In VMs the emulated NIC consumes CPU resources; use the Synthetic adapter instead. Additional NICs will be necessary on the host for cluster heartbeat, backup, and management. If you’re using iSCSI look to have two virtual NICs on the host, assigned to different virtual switches / physical network cards to provide redundant paths to the storage. In a cluster your Virtual Network names need to be identical across all hosts or Live Migration / Quick Migration won’t work.