Windows has been a bit of mystery to me ever since I switched to Mac back in 2009. But, I recently need to debug a Windows-related problem with my Manning LiveProject. In order to investigate the problem, I needed a Windows machine that could run Docker for Desktop Windows. I was reluctant to simply buy a Windows laptop so I searched for alternative solutions. This post describes how after trying Parallels and Azure VMs, I picked Windows 365 Cloud PC.
I eventually stumbled across the idea of using Parallels on my Mac. While running Windows on my Mac in a VM is, perhaps, an obvious solution there’s one complication. Docker for Desktop for Windows needs a (Linux) virtual machine. In other words, this setup requires nested virtualization - a Linux VM inside a Windows VM - which is not officially supported by Docker.
Fortunately, it ‘works’ when using Parallels Desktop 17 for Mac on an Intel-based (not M1-based) Mac. Note: Parallels Desktop 17 for Mac is confusingly different than Parallels Desktop in the App Store. I say, ‘works’, because it was sometimes very slow and I needed to periodically reboot Windows.
Once I’d got everything setup, I discovered two problems with running the LiveProject on Windows.
First, when using the WSL2 command line, there was a networking issue with the Docker Compose plugin for Gradle.
This problem was fixed by simply using a new version of the plugin.
Second, when using the Powershell command line, there was a problem with volume mounting when running test containers-based tests due the dual personality environment:
I fixed this problem by building Docker images locally instead of volume mounting Prometheus and Keycloak configuration files.
By using Parallels I was able to run Windows on my MacBook and fix this problem. But it was slow and didn’t run on my primary M1 MacBook. I figured it was time to look at the Cloud!
First, I tried using an Azure VM. Technically, it’s quite straightforward apart from figuring out which of the remarkly confusing VM types supported nested virtualization. Once I’d done that it was just a few mouse clicks to create the VM and connect to it with Remote Desktop. The problem, however, is that the VM apparently doesn’t come with its own license. At this point, I entered the hell that is the documentation for Microsoft licensing and gave up.
Next, I chatted briefly with Bruno Borges who helpfully suggested that I look at Windows 365 Cloud PC. This looked extremely promising since its rent-a-PC in the cloud. But what wasn’t obvious, is whether it supports nested virtualization. Sadly, the website is focussed on telling customers how happy and fullfilled they will be rather than providing any useful technical details.
However, I googled and found an article describing how Windows 365 Enterprise Cloud PCs support nested virtualization. With just a few clicks of the mouse I bought a 8-core, 32G Windows 365 Enterprise Cloud PC. I then waited, and waited, … It turned out that I did not have an ‘enterprise’ account and the deployment failed.
I then created an 8-core, 32G Windows 365 Business Cloud PC. I couldn’t find any documentation (or get a quick answer from Microsoft support) describing whether ‘Business’ Cloud PCs support nested virtualization but I figured that I had very little to lose by trying.
I was pleasantly surprised to discover that I finally had a Windows 11 PC capable of running WSL2 and Docker Desktop for Windows. It’s accessible via Microsoft Remote Desktop and seems fairly responsive. The Cloud PC costs USD $123/month so its probably a bit more expensive than buying a laptop. But at least I don’t need to carry it around.
Microservices.io is brought to you by Chris Richardson. Experienced software architect, author of POJOs in Action, the creator of the original CloudFoundry.com, and the author of Microservices patterns.
Chris helps clients around the world adopt the microservice architecture through consulting engagements, and training workshops.
Chris teaches comprehensive workshops for architects and developers that will enable your organization use microservices effectively.
Avoid the pitfalls of adopting microservices and learn essential topics, such as service decomposition and design and how to refactor a monolith to microservices.Learn more
Chris offers numerous other resources for learning the microservice architecture.
Want to see an example? Check out Chris Richardson's example applications. See code
Got a specific microservice architecture-related question? For example:
Consider signing up for a two hour, highly focussed, consulting session.
My virtual bootcamp, distributed data patterns in a microservice architecture, is now open for enrollment!
It covers the key distributed data management patterns including Saga, API Composition, and CQRS.
It consists of video lectures, code labs, and a weekly ask-me-anything video conference repeated in multiple timezones.
The regular price is $395/person but use coupon MECNPWNR to sign up for $120 (valid until May 16th, 2023). There are deeper discounts for buying multiple seats.
Take a look at my Manning LiveProject that teaches you how to develop a service template and microservice chassis.
Engage Chris to create a microservices adoption roadmap and help you define your microservice architecture,
Use the Eventuate.io platform to tackle distributed data management challenges in your microservices architecture.
Eventuate is Chris's latest startup. It makes it easy to use the Saga pattern to manage transactions and the CQRS pattern to implement queries.
Engage Chris to conduct an architectural assessment.
Note: tagging is work-in-process
anti-patterns · application api · application architecture · architecting · architecture documentation · assemblage · beer · containers · dark energy and dark matter · deployment · design-time coupling · development · devops · docker · eventuate platform · glossary · hexagonal architecture · implementing commands · implementing queries · inter-service communication · kubernetes · loose coupling · microservice architecture · microservice chassis · microservices adoption · microservicesio updates · multi-architecture docker images · observability · pattern · refactoring to microservices · resilience · sagas · security · service api · service collaboration · service design · service discovery · service granularity · service template · software delivery metrics · success triangle · tacos · team topologies · transaction management · transactional messaging