I am a DevOps engineer, and my job is writing and managing software run in container and Kubernetes. The only other thing is, I work with the Windows Server instead of Linux often. Yes. Historically, I was a Windows Desktop App Developer, an ASP.NET Developer, and now I am a DevOps Engineer.
If you are using the MacBook or iMac, and if you are developing any type of Windows application, you may be using Parallels or similar virtualization software. As you know, the Coherence mode is beneficial. And I’m a big fan of coherence mode in the Parallels. (VMware Fusion also offers a similar feature called the Unity, but it looks ugly and slow. 😭)
Windows evolves dramatically about Container technology. It was a very massive jump in its history, and that was great. But despite this quantum-jump, Windows is not a Linux, and its limitation is quite explicit.
Currently, Windows does not support running container images of different versions from the host operating system directly. This limitation makes the situation harder for hypervisor users because the case involves virtualization itself. So, that means you should use the hypervisor, which supports nested virtualization.
Painful Nested Virtualization
Nested virtualization is usually not the right solution because, in many cases, it performs a prolonged run or produces a result quite unstable. Even if you are purchased Pro version of the Parallels or VMware Fusion, it might end up unsuccessful.
What about the boot camp? Boot camp transforms your Mac into a great Windows PC, but it forces that you have to boot into the Windows operating system. Plus, Windows on Mac works awkwardly. I don’t like the way works of a built-in touchpad on Windows. 😇
Also, both Microsoft and Apple do not guarantee the quality of the Windows experience. Later versions of Windows are getting worse and worse on the Bootcamp environment.
Lastly, If you are wondering why I fight this problem only on my local machine, I’ll tell you. I want to keep my focus on my development environment only on my MacBook, not to the cloud. And I don’t want to pay my money for that.
So how can I break this hassle? That’s simple. I made a secondary VM dedicated to the Windows Docker machine. Then I connected the VM with a Docker context.
Nevertheless, it is not a perfect solution, but it can be the Plan-B. For example, you may be confused about the docker volume and mounting the local folder. Sometimes I forgot I’m working on the remote Docker host and waste my time. 😇
Also, if you are using multiple versions of Windows because of the Windows Kubernetes, it can be cumbersome. Every time you should check the VM started up and change the context.
But, without the nested virtualization, it might be the best answer. Also, Hyper-V isolated container, even without the nested virtualization, basically it is slow. (Especially in the docker build command.)
To use the nested virtualization, or not to be. That is the question.