解决方案:
排除对应的使用端口 https://github.com/docker/for-win/issues/3171
查看是否成功排除 https://github.com/googlevr/gvr-unity-sdk/issues/1002@veqryn the workaround worked for me, the steps are:
Disable hyper-v (which will required a couple of restarts)
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V
When you finish all the required restarts, reserve the port you want so hyper-v doesn't reserve it back
netsh int ipv4 add excludedportrange protocol=tcp startport=50051 numberofports=1
Re-Enable hyper-V (which will require a couple of restart)
dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All
when your system is back, you will be able to bind to that port successfully.
The reserved port changes as follows and InstantPreview will work.
C:\WINDOWS\system32>netsh interface ipv4 show excludedportrange protocol=tcp Protocol tcp Port Exclusion Ranges Start Port End Port ---------- -------- 49687 49786 49838 49838 * 49839 49938 49939 50038 50039 50138 50139 50238 * - Administered port exclusions.
Run the following commands to reset the dynamic port range to what it should be and reboot - this should fix things until Windows messes up the dynamic port range again. This is only for ipv4. I haven't looked at ipv6, but I'd assume it's similar.
netsh int ipv4 set dynamicport tcp start=49152 num=16383 netsh int ipv4 set dynamicport udp start=49152 num=16383
另外 hyper-v 启动与关闭命令 https://github.com/docker/for-win/issues/6689, https://www.poweronplatforms.com/enable-disable-hyper-v-windows-10-8/
Enable Hyper V - You can do this by running the following command as administrator. - dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All
Enable Hypervisor with following command - bcdedit /set hypervisorlaunchtype auto
https://www.poweronplatforms.com/enable-disable-hyper-v-windows-10-8/
Option 2 – To Enable and Disable Hyper-V in PowerShell
1. Open an elevated PowerShell, and do step 2 or 3 below for what you want to do.
2. To Enable Hyper-V
A) In the elevated PowerShell window, copy and paste the command below, press Enter, and go to step 4 below. Note, If you do not use the -All switch, then you will not install the Hyper-V GUI Management Tools and Hyper-V Module for Windows PowerShell features.
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V –All3. To Disable Hyper-V
A) In the elevated PowerShell window, copy and paste the command below, press Enter, and go to step 4 below.
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All4. Type Y and press Enter when prompted to restart the computer.