Hyper-V Windows Server 2016 VM is super slow

I have a Hyper-V VM, both host and VM are running Windows Server 2016. The VM has Exchange 2016 installed and takes an hour to start up fully (all Exchange services). It is actually very solid when up and running but the long reboot time is a problem. I am trying to puzzle out why it is so slow. Simple example: if I click the Start button, I can slowly count to 5 before the Start menu appears. But I can't see any obvious reason. Here's the performance tab in Task Manager:

Performance

Note: I realise this is a low spec for Exchange 2016 but in fact there are very few users and it is for test. What I would like to understand is where the performance bottleneck(s) are, and whether there is anything I can fix.

If I look in the Hyper-V manager, CPU usage typically shows 1%-15%. During its very show start-up CPU usage is only 1%-2%. Resource allocation is default. There are several other VMs but none is grabbing much resource.


Solution 1:

Slow startup times are usually connected with slow storage performance and depending on the size of virtual machine disk may take more time to start completely, however, 1 hour is "a bit" too much. I would start with benchmarking your storage within the Exchange virtual machine to find out if it's not choking.

I have almost the same configuration with Exchange 2016 running inside a Hyper-V VM and had similar issues with performance (startup was OK but the overall performance wasn't good enough). I landed up with 16GB RAM and 8 vCPU for 10 users. Works great with these settings.

Solution 2:

This was fixed by moving the VM to an SSD on the same server. All other settings identical.

I believe the issue in this case is Storage Spaces. We are using a mirrored storage spaces pool for VM storage. I've done some research on this and it looks like it can be very slow unless you configure a write cache.

This is not a production server but in production it looks like you need to take a lot of care setting up storage spaces (or use something else).