hyper-vslowdown

Massive slowdown showing settings for a VM in Hyper-V manager, using certain Hyper-V powershell cmdlets. Why?


I'm seeing a massive slowdown when I right click on a VM in Hyper-V manager and show its properties. It takes 35 seconds to fully populate. Note in the screenshot where parts of the properties are still "Loading..."

Most property categories still loading...

Similarly, running certain cmdlets like Get-VMSecurity on a VM will take over 10 seconds to return.

What can cause this massive slowdown?


Solution

  • While there can be different causes, the solution on two different machines for me was to simply create a Hyper-V virtual switch called Default Switch in the Virtual Switch Manager. This completely eliminated this problem.

    Creating "Default Switch"

    I had been hitting this on an old dev machine and was excited to move to my new machine where I expected things to be better. Imagine my consternation when they weren't.

    After noticing things were super-snappy on some ancient 7-year-old hardware, I dug into the event viewer during the slowdown. It revealed that Hyper-V was constantly creating/initializing/using/destroying a switch called "Default Switch".

    It seems many Hyper-V management operations require the presence of a switch named Default Switch, and if it doesn't exist, it is created and then destroyed as needed, causing massive slowdown.

    My dev machines both lacked the default Default Switch, which does NAT network sharing. It was present at first, but after creating other virtual switches, it ceased to exist. I created an internal switch named Default Switch as shown above. Now the properties for a VM show up instantly in the Hyper-V Manager GUI, and the powershell cmdlets are snappy.