Processes run in the hyper-v container should not be visible in the host OS.
Processes run in the hyper-v conatiner are visible in the host OS
Book “Exam Ref 70-740 Installation, Storage and Compute with Windows Server 2016 Craig Zacker”, pages 381-382, quote:
Once you create a Hyper-V container, it is all but indistinguishable from a Windows
Server container. One of the few ways to tell the types of containers apart is to examine
how they handle processes. For example, you can create two containers and execute a
command in each one that starts them pinging themselves continuously, as shown in the
Click here to view code image
docker run -it microsoft/windowsservercore ping -t localhost
docker run -it --isolation=hyperv microsoft/windowsservercore
ping -t localhost
The Windows Server container created by the first command has a PING process
running in the container, as shown by the Docker Top command in Figure 4-10. The process
ID (PID) number, in this case, is 404. Then, when you run the Get-Process cmdlet, to
display the processes (starting with P) running on the container host, you see the same
PING process with the 404 ID. This is because the container is sharing the kernel of the
On the other hand, when you run the Docker Top command on the Hyper-V container, you
again see the PING process, this time with a PID of 1852, as shown in Figure 4-11.
However, the Get-Process cmdlet shows no PING process, because this container has its
own kernel provided by the hypervisor."
Steps to reproduce the behavior
As i read in a MS learning book - Wxam Rea 70-740, when docker container is created with isolation hyper-v, processes, run in the container, should not be in the host OS. But, when I start docker container with hyper-v isolation and run some processes ( for example, notepad) - I see this process in the host OS. I’m interesting - there is a mistake in the book which I read ? - Why processes in hyper-v container are visible in the host OS ?