Why WinDbg does not reconnect after target computer reboot? - driver

I was Setting Up KDNET Network Kernel Debugging Automatically to provision a computer for driver deployment and testing in order to Write a Hello World Windows Driver (KMDF) and after rebooting my target computer, WinDbg is still waiting to reconnect...
Both my host and target computers have Win10 (x64)
I am using Hyper-V, my host computer is the server (local) and my target computer is one of its workstation.
I tried to restart my target computer using shutdown -r -t 0 and followed the procedure to start a WinDbg session with the executable (WinDbg.exe, not the command line option). I also tried to turn off my firewall, but it does not helped.
Any idea?

Fully disabling firewalls on both target and host computers have solved the issue.

Related

My Docker is crashing in Windows 10 Enterprise - (Docker hv-sock proxy (vsudd) is not reachable)

I am using a Windows 10 Enterprise edition system. I have installed version: 17.03.1-ce-rc1-win3 (10625) Channel: edge . The Docker machine was working fine until a few days back. Few days back I had disable Hyper-V in my system to use Oracle Virtual box to use Kubernetes and as a fact when hyper-V is disabled Docker won't run so I turned it back on and now it's crashing all the time and I am getting the below error.
[16:24:15.562][NamedPipeServer][Error ] Unable to execute Start: Docker hv-sock proxy (vsudd) is not reachable at Docker.Backend.ContainerEngine.Linux.ConnectToVsud(TaskCompletionSource`1 vmId)
at Docker.Backend.ContainerEngine.Linux.DoStart(Settings settings)
at Docker.Backend.ContainerEngine.Linux.Start(Settings settings)
at Docker.Core.Pipe.NamedPipeServer.<>c__DisplayClass8_0.<Register>b__0(Object[] parameters)
at Docker.Core.Pipe.NamedPipeServer.RunAction(String action, Object[] parameters)
[16:24:15.599][CrashReport ][Info ] Preparing package to send with the diagnostics
I uninstalled and installed Docker again but no vain and still getting error.
After a lot of tries with different combination the below final steps took care of my issue and my docker is running again.
Steps taken to resolve the issue :-
Uninstalled Docker from my system and deleted the .docker and 'Virtual Hard Disk' directory which usually has the mobyLinuXVM file.
Uninstalled Oracle virtual Box from my machine.
Restarted my system and went to BIOS and unchecked/disabled the Virtualization options and logged into my system to see if virtualization is disabled using command systemInfo in cmd prompt and it was disabled.
Restarted my system again and went to BIOS and checked/enabled the virtualization option and logged into my system and made the virtualization was enabled back.
Installed again the docker and it was a charm and it started running.
The above steps may sound lame but it worked.

The docker client must be run elevated to connect

When I am trying to built docker app, I am getting below error. Command I am running is docker build -t node_curd_exe .
error during connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&session=h3q9gxeprezyco28agiqe9jp2&shmsize=0&t=node_curd_exe&target=&ulimits=null&version=1: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
Anything else I can do ?
I have encountered this problem myself. My problem was that I had configured Docker Desktop to not run at startup. As long as Docker Desktop is not running, you will not have the Docker daemon running, hence the error.
Quickly check whether you have a white whale in your taskbar before trying any more exotic solutions.
Try this:
"Hardware assisted virtualization and data execution protection must be enabled in the BIOS"
Typically, this problem is due to a disabled Hyper-V or because the hypervisor agent is not running.
Open a Windows shell as administrator and enable Hyper-V with:
dism /Online /Enable-Feature:Microsoft-Hyper-V /All
Reboot your machine and see if Docker for Windows starts.
If the above doesn't work, open a Windows shell as administrator and enable the hypervisor with:
bcdedit /set hypervisorlaunchtype auto
If Docker for Windows is still not working properly, try the following additional solutions, which are based on instructions extracted from this Docker for Windows issue thread.
Reboot your machine and see if Docker for Windows starts.
Copy this path: Control Panel\Programs\Programs and Features into a File Explorer address bar.
Click Turn Windows feature on or off on the left side of the Control Panel.
Clear the Hyper-V check box in the list of Windows features.
Reboot your machine and start Docker for Windows (or reinstall if necessary). If the above doesn't work, then Virtualization Based Security (VBS) might be interfering and needs to be disabled. Try the following to disable VBS:
Open the Local Group Policy Editor (gpedit.msc)
Go to Computer Configuration\Administrative Templates\System\Device Guard
Disable VBS.
I had a similar issue : Docker Desktop was configured to run Linux containers but my Visual Studio project targeted Windows containers.
So after launching Docker, I right-clicked the whale (was red) in the taskbar's tray and selected the 'Switch to Windows containers' menu item.
An error message showed up talking about 'Deny write access for fixed drives not protected by Bitlocker' which was fixed by launching a regedit and putting a 0 for the following key : Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Policies\Microsoft\FVE\FDVDenyWriteAccess
Then repeating the tray action finally worked and the whale turned to white.
Open PowerShell as Administrator and run:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
try this on your CMD:
docker-machine create box
docker-machine env box
this issue still open
What solved in my case, on Windows 11, was to turn off Hypervisor and Windows Subsystem for Linux, reboot and turn on again.

Can't start docker on windows

I continue to get the following error when trying to start docker on Windows 10 pro. my HyperV is turned on and running:
Version 18.04.0-ce-win62 (17151)
Channel: edge
e0a85f6
Any help would be appreciated!
Unable to create: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Hyper-V encountered an error trying to access an object on computer 'C001715587' because the object was not found. The object might have been deleted. Verify that the Virtual Machine Management service on the computer is running.
at New-Switch, : line 117
at , : line 394
at Docker.Core.Pipe.NamedPipeClient.Send(String action, Object[] parameters) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Core\pipe\NamedPipeClient.cs:line 36
at Docker.Actions.DoStart(SynchronizationContext syncCtx, Boolean showWelcomeWindow, Boolean executeAfterStartCleanup) in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Windows\Actions.cs:line 75
at Docker.Actions.<>c__DisplayClass15_0.b__0() in C:\gopath\src\github.com\docker\pinata\win\src\Docker.Windows\Actions.cs:line 59
at Docker.WPF.TaskQueue.<>c__DisplayClass19_0.<.ctor>b__1() in C:\gopath\src\github.com\docker\pinata\win\src\Docker.WPF\TaskQueue.cs:line 59
You may need to fix your "Control Flow Guard" settings for vmcompute.
(Be aware that CFG is an exploit-protection mechanism, so pay attention when changing it and understand why it exists.)
Open Windows Security
Open App & Browser control
Click Exploit protection settings
Switch to Program settings tab
Locate C:\WINDOWS\System32\vmcompute.exe in the list and expand it
Click Edit
Scroll down to Control flow guard (CFG) and uncheck Override system settings
Start vmcompute from powershell net start vmcompute (or alternately start the Hyper-V Host Compute Service from the system Services app)
Restart PC
Open Hyper-V as Administrator
Connect to Server, Local computer, OK
The above worked for me when I couldn't run docker, then I realized I couldn't connect to my local machine on hyper-v. This is what finally worked.
Try this. It's sorting the problem of many people.
cd "C:\Program Files\Docker\Docker"
./DockerCli.exe -SwitchDaemon
I tried to run it from C:\Program Files\Docker\Docker\Docker Desktop.exe
And it worked.
Also, one more thing I added is I kept the Cisco AnyConnect VPN service running (although none of the VPNs were connected). I know this point sounds weird but I thought to share it.
If You, like me, already have an installed wsl2 distro on Your system (at the time You install Docker Desktop) and all the answers above did not help, than look if Your distro is actually running by hitting the command wsl -l -v
wsl -l -v
NAME STATE VERSION
* Ubuntu-20.04 Running 2
docker-desktop Running 2
docker-desktop-data Running 2
If so, then shutdown Your wsl instance by running wsl -t Ubuntu-20.04 this fixed the issue on my system. Docker Desktop window came immediately up after the wsl instance was down.
I think the problem is that I already have a docker installed in this wsl instance.
If you facing
Unable to stop Hyper-V VM: Service 'Hyper-V Host Compute Service
(vmcompute)' cannot be started due to the following error: Cannot
start service vmcompute on computer '.'.
this error then follow the steps:
Open "Window Security"
Open "App & Browser control"
Click "Exploit protection settings" at the bottom
Switch to "Program settings" tab
Locate "C:\WINDOWS\System32\vmcompute.exe" in the list and expand it
Click "Edit"
Scroll down to "Code flow guard (CFG)" and uncheck "Override system settings"
Start vmcompute from powershell "net start vmcompute"
The fix for me was to enable virtualisation in my bios. It'll be in Advanced > CPU Configuration > SVM - make sure it's enabled

Docker for Windows can't reach the database in Windows 10 enterprise evaluation

I was trying Docker Desktop for Windows on a VM with Windows 10 Enterprise evaluation.
This is the error that I get:
I've searched round here but I haven't found nothing usefull. I have opened the log file and found error message like:
Failed to setup server socket listening on hyperv-connect://... Failed
to contact the database on \.\pipe\dockerDataBase.... File not found
Unable to write to database (continue like image above)
Nobody have idea? I've accepted the initial prompt when Docker asks me if I want to enable the Hyper-V feature and restart the computer after activation. Could it be a problem of nested virtualization?
I had the same problem and I solved it after I executed this command on a Powershell window:
bcdedit /set hypervisorlaunchtype Auto
I also had to enable CPU virtualization on the hardware properties of the virtual machine (I'm using VMWare vCenter, that might not be needed in your case)
The problem was the nested virtualization. Docker for Windows use Hyper-V behind the scene, Hyper-V was on the host machine too, so there's two nested virtual machine.
The steps are:
Create virtual machine named Docker (the one where Docker will be installed on) without dynamic memory allocation
Open Powershell and Set-VMProcessor -VMName "Docker" -ExposeVirtualizationExtensions $true
Install SO and Docker for Windows as usual
Be aware host machine and guest machine must share the same build number and both needs to be a Windows 10 or Windows Server 2016.

Can not start Docker 1.9.1

I am a newbie about docker.
This morning I have just download and install docker 1.9.1 to my computer (OS: windows)
After install it, I run 'Docker Quickstart Terminal' but it fail
The console keep print like this:
Machine default already exists in VirtualBox.
Starting machine default...
(default) Starting VM...
Machine "default" was started.
Started machines may have new IP addresses. You may need to re-run the `docker-m
achine env` command.
Regenerate TLS machine certs? Warning: this is irreversible. (y/n): Regeneratin
g TLS certificates
Detecting the provisioner...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Setting environment variables for machine default...
Looks like something went wrong... Press any key to continue...
I have tried to remove the Virtual Machine and create it again, but the problem still happen
Creating Machine default...
Running pre-create checks...
Creating machine...
(default) Copying C:\Users\mcthanh\.docker\machine\cache\boot2docker.iso to C:\U
sers\mcthanh\.docker\machine\machines\default\boot2docker.iso...
(default) Creating VirtualBox VM...
(default) Creating SSH key...
(default) Starting VM...
Waiting for machine to be running, this may take a few minutes...
Machine is running, waiting for SSH to be available...
Detecting operating system of created instance...
Detecting the provisioner...
Provisioning with boot2docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect Docker to this machine, run: C:\Program Files\Docker Toolb
ox\docker-machine.exe env default
Setting environment variables for machine default...
Looks like something went wrong... Press any key to continue...
Do you have any exp about this?
Thank you very much for your help!!!
After a sleep / wake cycle, Windows detects the Host-Only network as a "duplicate" and changes its IP. After that, docker-machine (or the Quickstart terminal) doesn't work anymore.
It is probably caused by this VirtualBox bug (from 5 years ago): so there doesn't seem to be a fix soon from VirtualBox. And it's probably a Windows bug.
This should be a valid workaround:
Open VirtualBox
Go to File -> Preferences -> Network -> Host-only Networks
Docker Toolbox probably created a second Host-only network, probably named "VirtualBox Host-Only Ethernet Adapter # 2", double click that
Change the "IPv4 Address" from something like 192.168.99.1 to something like 192.168.99.2 (you will probably have to increase / decrease the IP every time). But it's important that the IP actually changes.
Hit OK. If the IP changed (it should have changed), you will be prompted for you "Windows Administrator OK" (or however it's named).
After that, the docker-machine and the Quickstart Terminal should work.
Sometimes we have virtualization disabled in our system make sure that
virtualization is enabled or not ?
follow given steps to check if u have virtualization enabled or not
Open Task manager
Click on performance
Click on CPU
Check whether virtualization is enabled or not
If it is disabled then go to bios setting and enable it.

Resources