Slow Linux / Docker VM on Hyper-V

On recent versions of Hyper-V i found that many of my linux VMs (home assistant, docker hosts, etc) were really slow. This came to a head when i had terrible performance of portainer on my docker swarm and containers on the docker swarm were slow.

To cut a long story short the issue is Receive Segment Coalescing (RSC) and thanks to this site i learnt how to fix it.

Ether logon to each hyper-v host or use a remote PS session and issue the following command for the virtual switch the VMs are connected to. In my case the virtual switch is call External:

Set-VMSwitch -Name External -EnableSoftwareRsc $false

Alternatively if you want to do it for the whole hyperv host use:

netsh int tcp set global RSC=Disabled

Enable RDP Remotely

Sometimes one forgets to enable RDP before one removed the keyboard and mouse and places the server somewhere else. Here is easiest way to enable it.

Enter-PSSession Server01
netsh firewall set service remotedesktop enable
netsh firewall set service remoteadmin enable

First line makes a remote connection.

Next two lines are executed on the remote machine.

Note: these only work if powershell remoting has been enabled on all servers, by default it is. For windows clients you will need to have run this command first on the remote machine (so you need to do this when you install).


For more information see:

Of course if you now have PS remoting working maybe you don’t need RDP 😉