How Do I Build Windows Container Environment With Parallels

Jung-Hyun Nam
Mar 27 · 3 min read
Image for post
Image for post
Photo by Nick Karvounis on Unsplash

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.

Limitations

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.)

Conclusion

To use the nested virtualization, or not to be. That is the question.

Beyond the Windows

DevOps Engineer’s Blog

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store